kotlin while
var i = 1
while (i < 5) { // while loop
println(i)
i++
}
var i = 1
do { // do-while loop
println(i)
i++
} while (i < 5)
kotlin while
var i = 1
while (i < 5) { // while loop
println(i)
i++
}
var i = 1
do { // do-while loop
println(i)
i++
} while (i < 5)
kotlin simple for loop
val names = listOf("Jack", "John", "Tim")
for(name in names){
println(name)
}
kotlin while loop
while ( isTrue() );
while ( isTrue() ) {
println("while!")
}
do {
println("do while!")
} while (isTrue())
while loop kotlin
var i = 1
while (i < 5) { // while loop
println(i)
i++
}
var i = 1
do { // do-while loop
println(i)
i++
} while (i < 5)
while loop kotlin
fun displayForLoop() {
for (i in 1..5)
println(i)
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us