kotlin foreach example Example: kotlin iterate array val names = listOf("Anne", "Peter", "Jeff") for (name in names) { println(name) }