I just noticed that the following code, without immediately referencing one
after let [one, two] = [1, 2]
, trying [one, two] = [two, one]
would crash:
let [one, two, three] = [1, 2, 3]
[one, two] = [two, one] // CRASH! one is not defined
console.log(one, two)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…