mapOf / mutableMapOf
Key-value pairs.
Syntax
mapOf("k" to v) // m["k"]Description
Stores key-to-value pairs. Values are accessed via m["k"]; mutableMapOf is mutable.
Example
Loading editor…
This language is for reference/learning only — copy the code and try it in your own environment.
Expected output
Alex 2
When to use?
Holding an object's properties; JSON.