Type of map keys. Typically string
Type of stored values
Adds one or more items, returning the changed map.
Can add items in the form of [key,value] or {key, value}.
Returns an empty map
Returns true if map is empty
Sets key to be value, overwriting anything existing.
Returns a new map with added key.
An immutable map. Rather than changing the map, functions like
addanddeletereturn a new map reference which must be captured.Immutable data is useful because as it gets passed around your code, it never changes from underneath you. You have what you have.
Example