Practice: Working with Map Objects

Map objects are collections of key-value pairs where each key in the Map can only occur once and is unique within the Map's collection. A Map object is iterated by key-value pairs, meaning that a for...of loop returns a 2-member array of [key, value] for each iteration. Iteration occurs in insertion order, which corresponds to the order in which each key-value pair was first inserted into the map using the set() method (that is, if there was not already a key with the same value present when set() was called). Try the examples at the end of the section. These exercises do not count toward your grade. It is just for practice!

Static properties

Map[@@species]

The constructor function that is used to create derived objects.