Map.prototype.get
returns the element from the map for a key
get(key)
returns the value stored for this key
multiple calls still return the same value
requires exactly the value as passed to set()
leave out the key, and you get the value set for the key undefined
(void 0)
returns undefined for an unknown key
Required Knowledge
- array (Iterator)
Related Katas
Map
- basics
map.get()
map.set()
- initialize
map.has()
Difficulty Level
INTERMEDIATE
First Published
22 May 2015
Stats
5 tests to solve