js assign default value in destructured object code example
Example: object destructuring default value
let a, b;
[a=5, b=7] = [1];
console.log(a); // 1
console.log(b); // 7
let a, b;
[a=5, b=7] = [1];
console.log(a); // 1
console.log(b); // 7