A collection is an 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 was the only collection object available in ES5. Now we have ArrayBuffers, SharedArrayBuffers, Typed Arrays, Sets, and Maps, which are built in collection objects.
Let's explore the different collection objects provided in JavaScript.