Associative array/Iteration: Difference between revisions
→Kotlin: Shortened the code for better readability
m (→{{header|Sidef}}: simplified code) |
(→Kotlin: Shortened the code for better readability) |
||
Line 2,017:
=={{header|Kotlin}}==
<syntaxhighlight lang="scala">fun main(
val map = mapOf("hello" to 1, "world" to 2, "!" to 3)
with(map) {
keys.forEach { println("key = $it") }
values.forEach { println("value = $it") }
|