[a,b] = [b, a+b] here not work , a b always 0 and 1.
If use a temp variable to swap the value ,that works.
function fibonacciSequence() {
let [a, b, arr] = [0, 1, []]
while (a <= 255) {
arr.concat(a)
[a, b] = [b, a + b]
console.log(a, b) // always 0 1
}
}
console.log(fibonacciSequence())
arr.concat(a)[a, b]to mean?