数组方法随机排列 let arr = ["a", "b", "c", "d", "e", "f", "g"]; let j , temp; for (let i = arr.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } console.log(arr); ```