Collection Reference Types
Matt Frisbie · 2019
Objects in JavaScript are called reference values, and several built-in reference types can be used to create specific types of objects. After the Object type, the Array type is the most used in European Computer Manufacturers AssociationScript (ECMAScript). An ECMAScript array is very different from arrays in most other programming languages. New in ECMAScript 6, the typed array is a construct designed for efficiently passing binary data to native libraries. ECMAScript 6 introduced a handful of collection types: Map, WeakMap, Set, and WeakSet. Much of what Map offers is an overlap with what is provided by the Object type, but there are subtle differences between the Object and Map types that should be taken into account when selecting one for use. A Set in many ways behaves more like an augmented Map, as much of the application programming interface and behavior is shared.