Maps
Maps โ sometimes called associative arrays, hashes, or dictionaries in other programming languages, store a collection of key-value pairings. Maps are constructed as a comma-separated list of key-value pairs enclosed by curly braces. Each key-value pair uses a colon to differentiate between the key and the value.
Accessing Elements
You can access any element in a map by calling the subscript operator on it with the key of the element you want.
Calling a key that does not exist will return a null
value.
Last updated