ES6 ARRAY OPERATORS
[Pages:5]ES6 ARRAY OPERATORS
Ultimate JavaScript arrays
INTRODUCTION
ES6 is a new version of JavaScript which became widely supported in 2015-2016 ES6 introduces new and unique array operators to JavaScript Rest and Spread operators both look like elipses: ... We will cover both operators in this chapter Rest and Spread are very convenient, so use them!
SPREAD OPERATOR
Expands an array Convenient shorthand Takes an array and spreads it out into all its elements Only works while defining arrays
REST OPERATOR
Takes all the arguments supplied to a function and turns them into an array Useful for functions where large amount of arguments are passed to it Only works inside the arguments section of a function declaration
CONCLUSION
Rest and spread operators add convience (syntactic sugar) to code involving arrays
It is not necessary to use Rest and Spread but usually it is clearer if they are used Only work in ES6-compatible environments
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- beginner s essential javascript cheat sheet infopediya
- exploring es6 kh
- exploring es6 134 209 103 215
- javascript es6 pdf
- exploring es6 139 59 96 131
- beginner s essential javascript cheat sheet websitesetup
- es6 array operators
- javascript basics github pages
- introduction to ecmascript 6 es6 development tt4132
- es6 javascript metaprogramming object proxies sjsu