Repeat-while loop

suggest change

Similar to the while loop, only the control statement is evaluated after the loop. Therefore, the loop will always execute at least once.

var i: Int = 0

repeat {
   print(i)
   i += 1
} while i < 3

// 0
// 1
// 2

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents