Map
is a key-value collection, where you store values under particular keys and
can retrieve them later by key.
mapOf()
creates an immutable Map
. The parameters to mapOf()
are Pair
objects.
The simplest way to create a Pair
is to separate the paired values by to
. The
first element of the Pair
is used as the key; the second element is the value
saved to the Map
under that key.
You can learn more about this in:
Tags: