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_operatorBonding arrays contained in an array of objects using the spread operator and initialValue
@reference_2_mozilla_ReduceRest parameters
@reference_3_mozilla_rest_parameters
No comments:
Post a Comment