Skip to content

Instantly share code, notes, and snippets.

@travisdachi
Last active August 17, 2016 22:41
Show Gist options
  • Save travisdachi/a3cb610a96c58454a3f939220cad7add to your computer and use it in GitHub Desktop.
Save travisdachi/a3cb610a96c58454a3f939220cad7add to your computer and use it in GitHub Desktop.
val m: MutableMap<String, String> = mutableMapOf(
Pair("one", "1"),
"two" to "2"
)
println(m["two"])
m["three"] = "3"
m.forEach { println("${it.key}: ${it.value}") }
for ((k, v) in m) println("$k:$v")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment