var shuffle = function(v){
for(var j, x, i = v.length; i; j = parseInt(Math.random() * i),
x = v[--i], v[i] = v[j], v[j] = x);
return v;
};
}
JavaScript 数组乱序
最新推荐文章于 2021-10-11 16:37:32 发布
var shuffle = function(v){
for(var j, x, i = v.length; i; j = parseInt(Math.random() * i),
x = v[--i], v[i] = v[j], v[j] = x);
return v;
};
}