May 2018
Intermediate to advanced
190 pages
2h 19m
English
In this chapter we’ll discuss most of the new methods available in ES6 that work with the Array type, using Array.* and Array.prototype.*.
When discussing them, I’ll write Array.method() when I describe a “class” method and Array.prototype.method() when I outline an “instance” method.
We’ll also see some example uses and mention several polyfills for them. If you need a polyfill-them-all library, you can use es6-shim by Paul Miller.
The first method I want to mention is Array.from(). It creates a new Array instance from an array-like or an iterable object. This method can be used to solve an old problem with array-like objects that most developers solve using ...
Read now
Unlock full access