📅  最后修改于: 2022-03-11 15:02:25.756000             🧑  作者: Mango
function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
}