Assignment separate from declaration code example
Example: Assignment separate from declaration
let a, b;
[a, b] = [1, 2];
console.log(a); // 1
console.log(b); // 2
let a, b;
[a, b] = [1, 2];
console.log(a); // 1
console.log(b); // 2