Map is a key/value map
Mapis a global constructor function
new Map().set()to add key+value pair,
get()to read it by key
has()tells if map has the given key
delete()deletes the element given by the key AND
map.sizereports the number of items
values()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
MDN page about Map.
The chapter in the specification, with all details about Map.