Programming-Idioms

History of Idiom 2 > diff from v77 to v78

Edit summary for version 78 :
New Kotlin implementation by user [jtang]

Version 77

2019-09-26, 16:54:56

Version 78

2019-09-26, 17:27:09

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration
Code
for( i in 0..9 ){
    println("Hello")
}
Doc URL
https://www.programiz.com/kotlin-programming/for-loop