将下列数组随机打乱
let ary = [12, 2, 3, 2, 99, 32]; ary.sort((a, b) => { return Math.round(Math.random() * 10 - 5); })
js常用取整方法:
Math.round(Math.random()*(最大值-最小值)+最小值)