array destrcuturing up until certain elemant code example
Example: destructure array javascript
var [first, second, ...rest] = ["Mercury", "Earth", ...planets, "Saturn"];
var [first, second, ...rest] = ["Mercury", "Earth", ...planets, "Saturn"];