Kotlin enquanto loop
while (testExpression) {
// codes inside body of while loop
}
SAMER SAEID
while (testExpression) {
// codes inside body of while loop
}
var i = 1
while (i < 5) { // while loop
println(i)
i++
}
var i = 1
do { // do-while loop
println(i)
i++
} while (i < 5)
fun displayForLoop() {
for (i in 1..5)
println(i)
}