destructur array to make one string code example
Example 1: mdn destructuring
const x = [1, 2, 3, 4, 5];
const [y, z] = x;
console.log(y); // 1
console.log(z); // 2
Example 2: destructure to object
({x: oof.x, y: oof.y} = foo);
const x = [1, 2, 3, 4, 5];
const [y, z] = x;
console.log(y); // 1
console.log(z); // 2
({x: oof.x, y: oof.y} = foo);