保留原值
长度任意,保留原值,返回新数组。
1 | shuf = (arr) => Array.prototype.reduce.call(arr,(acc, el) => { |
要不顺便写个运气测试……?
1 | function looksRandom(shuf) { |
长度任意,保留原值,返回新数组。
1 | shuf = (arr) => Array.prototype.reduce.call(arr,(acc, el) => { |
要不顺便写个运气测试……?
1 | function looksRandom(shuf) { |
Author: 蓝思同学
Permalink: https://www.lancema.com/javascript/20210506/2021-study-javascript-shi-xian-shu-zu-sui-ji-pai-xu.html
Slogan: small is beautiful, small is powerful !