This iterates over the collection and calls the given action function on each item:
val numbers = listOf(1, 2, 3, 4, 5)
numbers.forEach { n -> println(n) }
This iterates over the collection and calls the given action function on each item:
val numbers = listOf(1, 2, 3, 4, 5)
numbers.forEach { n -> println(n) }
18.224.43.85