Map objects are collections of key/value pairs where both the keys and values may be arbitrary ECMAScript language
values. A distinct key value may only occur in one key/value pair within the Map’s collection. Key/value pairs are stored
and iterated in insertion order.
If the passed value is null or undefined then an empty map is constructed. Else an iterator object is expected
that produces a two element array-like object whose first element is a value that will be used as a Map key and
whose second element is the value to associate with that key.
Returns an iterator containing all key/value pairs of this map.
The iterator produces a series of two-element arrays with the first element as the key and the second element as the value.
Runs the provided callback function once for each key/value pair present in this map.
Parameters:
callback - The function to call, which is invoked with three arguments: the value of the element, the key of the element, and the Map object being iterated.
Runs the provided callback function once for each key/value pair present in this map.
Parameters:
callback - The function to call, which is invoked with three arguments: the value of the element, the key of the element, and the Map object being iterated.
thisObject - The Object to use as 'this' when executing callback.
You can't use JavaScript bracket notation to access map entries. JavaScript bracket notation accesses only
properties for Map objects, not map entries.