1
0
Fork 0

Fix bug 570

Bug570_CaiShuHuang
Caroline 2024-07-03 09:45:44 +08:00
parent 8664da12de
commit eb2051ca3f
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ function random_select_word(word) {
// 将NodeList转换为数组 // 将NodeList转换为数组
let wordContainersArray = [...wordContainers]; let wordContainersArray = [...wordContainers];
// 随机打乱数组 // 随机打乱数组,乱序
for (let i = wordContainersArray.length - 1; i > 0; i--) { for (let i = wordContainersArray.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1)); const j = Math.floor(Math.random() * (i + 1));
[wordContainersArray[i], wordContainersArray[j]] = [wordContainersArray[j], wordContainersArray[i]]; [wordContainersArray[i], wordContainersArray[j]] = [wordContainersArray[j], wordContainersArray[i]];