Spread / Rest in ES6

Syntax

  1. Function call foo(...[1,2,3]);

  2. Array Literal var b = [ 1, ...a, 5 ];

  3. Function parameters function foo(x, y, ...z) { /* .. */ }

Spread

Rest

comments powered by Disqus