DEV Community

Discussion on: Destructuring Assignment in ES6- Arrays

Collapse
 
joquijada profile image
Jose Quijada • Edited

It might be worth mentioning that the syntax used in code below is also called JavaScript rest parameter syntax, specifically the ...intro part,

var [greeting,...intro] = ["Hello", "I" , "am", "Sarah"];
Enter fullscreen mode Exit fullscreen mode