摘要: 1、随机数(不能完全乱序,性能较低) function shuffle(array) { array.sort(() => Math.random() - 0.5); } let arr = [1, 2, 3]; shuffle(arr); alert(arr); 2、Fisher–Yates sh 阅读全文
posted @ 2020-01-14 10:56 epoch丶 阅读(156) 评论(0) 推荐(0) 编辑