// 混淆数组
function randomArray(arr){
return arr.sort(() => Math.random() -0.5);
}

console.log(randomArray([1,2,3,4,5]));

// [ 1, 3, 2, 5, 4 ]