val map = hashMapOf(1 to 2) for (entry in map.entries) { val key = entry.key val value = entry.value }