Kotlin - Loops and Ranges
Identify the error in this Kotlin code snippet:
var i = 1
do {
println(i)
i++
} while i <= 3var i = 1
do {
println(i)
i++
} while i <= 3do-while syntaxwhile condition must be inside parentheses after the while keyword.while i <= 3 without parentheses. It should be while (i <= 3).15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions