标签:dex cti while min ref splice ice shuff random
function shuffle(arr){
var newArr = [];
while (arr.length){
var randomIndex = Math.floor(Math.random() * arr.length);
newArr.push(arr.splice(randomIndex,1)[0]);
}
return newArr;
}
参考:https://juejin.im/post/5cef46226fb9a07eaf2b7516
标签:dex cti while min ref splice ice shuff random
原文地址:https://www.cnblogs.com/dadouF4/p/12720078.html