Created
August 12, 2016 03:22
-
-
Save akulubala/2e6809f7cb50596388d6437cb413c096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let puzzleArr = []; | |
i = 1; | |
// 生成包含1 ~ 15数字的数组 | |
for (i; i < 16; i++) { | |
puzzleArr.push(i) | |
} | |
// 随机打乱数组 | |
puzzleArr = puzzleArr.sort(() => { | |
return Math.random() - 0.5 | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment