Destructuring and Spread
Array Destructuring
Pull values out of an array by position.
Array Destructuring
array_destructure.js
const firstName = "Ada";
const [first, status] = [firstName, "ready"];
const label = first + ":" + status;
console.log("first=" + first);
console.log("label=" + label);
array-destructuring
Array destructuring assigns positions from the right-hand array to names on the left. It is useful when the position already has a clear meaning.