O'Reilly logo

Understanding ECMAScript 6 by Nicholas C. Zakas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10IMPROVED ARRAY CAPABILITIES

image

The array is a foundational JavaScript object. But while other aspects of JavaScript have evolved over time, arrays remained the same until ECMAScript 5 introduced several methods to make them easier to use. ECMAScript 6 continues to improve arrays by adding a lot more functionality, such as new creation methods, several useful convenience methods, and the ability to make typed arrays. This chapter walks you through those changes in detail.

Creating Arrays

Prior to ECMAScript 6, the two primary ways to create arrays were the Array constructor and array literal syntax. Both approaches required listing array items individually ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required