Map.prototype.set
adds a new element with key and value to a Map
simplest use case is set(key, value)
and get(key)
the key can be a complex type too
calling set()
again with the same key replaces the value
set()
returns the map object, it's chainable
Related Katas
Map
- basics
map.get()
map.set()
- initialize
map.has()
Difficulty Level
EXPERT
First Published
26 May 2015
Stats
4 tests to solve