標準的語法糖
let [a, b, c] = [1, 2, 3]
只要等號兩邊的模式相同 (例如都是 [] 或都是 {}),左邊的變數就會被賦予右邊的對應值。
getRandomNumberArray (count) {
const number = Array.from(Array(count).keys())
for(let index = number.length - 1; index > 0 ; index--) {
let randomIndex = Math.floor(Math.random() * (index + 1))
; [number[index], number[randomIndex]] = [number[randomIndex], number[index]]
}
return number
}
![[ week 2 ] 來打造 JaveScript 的基礎 - 變數 與 型別](https://static.coderbridge.com/images/covers/default-post-cover-1.jpg)

