The below Kotlin program will print numbers from 1 till 10 in each new line.
fun main() { (1..10).forEach(::println) }
The kotlin outcome is as follows:
1 2 3 4 5 6 7 8 9 10
As you can see, the new range object has the for each function which itself accepts the println function that will print each number within the range using loop in the new line!