Language syntax
Array rest binding
Collects remaining iterator values into a new array. Must appear at the end, with no trailing comma or default on the rest element. Nested objects remain shared.
Formal Syntax & Structure
javascript syntaxjavascript
const [head, ...tail] = iterable;Working Example
Example Snippetjavascript
const [a,...b]=[1,2,3]; console.log(a,b.join("|"));