Skip to content

Instantly share code, notes, and snippets.

@akulubala
Created August 12, 2016 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akulubala/2e6809f7cb50596388d6437cb413c096 to your computer and use it in GitHub Desktop.
Save akulubala/2e6809f7cb50596388d6437cb413c096 to your computer and use it in GitHub Desktop.
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