Map
is a key/value map
Map
is a global constructor function- provides
new Map().set()
to add key+value pair,get()
to read it by key has()
tells if map has the given keydelete()
deletes the element given by the key ANDmap.size
reports the number of itemskeys()
andvalues()
return iterables of the keys and values- a map can be iterated over using for-of
- a map is iterable
- complex types can be keys
Links
MDN page about Map.
The chapter in the specification, with all details about Map.