Three new Collections: SET(like Array), MAP(Key-Value Object) and WEAKMAP(like Map, but different)
ECMAScript 6 introduces a new data structure to map values to values.
A Map object is a simple key/value map and can iterate its elements in insertion order.
map.set
and map.get
methods are used to set and retrive the values from the Map colloection.
Traditionally, objects have been used to map strings to values.
Objects allow you to set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key.
Map objects, however, have a few more advantages that make them better maps.
These three tips can help you to decide whether to use a Map or an Object: