Logo

Programming-Idioms

History of Idiom 8 > diff from v67 to v68

Edit summary for version 68 by hover:
[Kotlin] add doc

Version 67

2019-12-28, 21:19:11

Version 68

2020-04-29, 09:20:40

Idiom #8 Initialize a new map (associative array)

Declare a new map object x, and provide some (key, value) pairs as initial content.

Idiom #8 Initialize a new map (associative array)

Declare a new map object x, and provide some (key, value) pairs as initial content.

Extra Keywords
table dictionary hash
Extra Keywords
table dictionary hash
Code
val x = mapOf("one" to 1, "two" to 2)
Code
val x = mapOf("one" to 1, "two" to 2)
Doc URL
https://kotlinlang.org/docs/reference/constructing-collections.html