React: Building Modern Web Applications
by Jonathan Hayward, Artemij Fedosejev, Narayan Prusty, Adam Horton, Ryan Vice, Ethan Holmes, Tom Bray
Collections
A collection is any object that stores multiple elements as a single unit. ES6 introduced various new collection objects to provide better ways of storing and organizing data.
The array is the only collection object available in ES5. ES6 introduces array buffers, typed arrays, Sets, and Maps, which are built in collection objects.
Let's see the different collection objects provided by ES6.
Array buffers
Elements of arrays can be of any type such as strings, numbers, objects, and so on. Arrays can grow dynamically. The problem with arrays is that they are slow in terms of execution time, and occupy more memory. This causes issues while developing applications that require too much computation and deal with large amount of numbers. Therefore ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access