Keys and values in Map collections
There are special methods to get only
keys or only values. To get values,
there is the values method:
let values = map.values();
Same for keys:
let keys = map.keys();
There is also the entries method
that returns a set of key-value
pairs:
let entries = map.entries();
Let a Map collection be given. Get
an array of its keys and loop through
them with a for-of loop.
Let a Map collection be given. Get
an array of its elements and iterate over
them with a for-of loop.