Monday, May 8, 2017

Spread syntax or Spread operator ...


The spread syntax allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) or multiple variables (for destructuring assignment) are expected.

Syntax

For function calls:
myFunction(...iterableObj); 
For array literals:
[...iterableObj, 4, 5, 6]; 
@reference_1_mozilla_Spread_operator

Bonding arrays contained in an array of objects using the spread operator and initialValue

@reference_2_mozilla_Reduce

 Rest parameters

@reference_3_mozilla_rest_parameters

 

No comments:

Post a Comment