array destructuring . code example
Example 1: destructure array javascript
var [first, second, ...rest] = ["Mercury", "Earth", ...planets, "Saturn"];
Example 2: js destructuring explained
const { identifier } = expression;
var [first, second, ...rest] = ["Mercury", "Earth", ...planets, "Saturn"];
const { identifier } = expression;