Answers for "for loop in kotlin with until"

1

kotlin loop until

for(i in 0 until a.size) {
       println(a[i]) /* iterates entire list */
    }
Posted by: Guest on November-27-2021
0

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)
Posted by: Guest on October-13-2021

Browse Popular Code Answers by Language