while in kotlin code example
Example 1: kotlin while loop
while ( isTrue() );
while ( isTrue() ) {
println("while!")
}
do {
println("do while!")
} while (isTrue())
Example 2: while loop kotlin
for (item in collection) print(item)
while ( isTrue() );
while ( isTrue() ) {
println("while!")
}
do {
println("do while!")
} while (isTrue())
for (item in collection) print(item)