I have this code:
let [foo, bar] = [0,1];
console.log("*") // If I don't put a semi colon here it fails
[foo, bar] = d(foo, bar);
console.log(foo, bar)
function d(a, b) {
return [1+a, 1+b]
}
If I don't add a semicolon at the line with the comment I get:
TypeError: console.log(...) is undefined
Is this a known behaviour of array destructing? (using Firefox)