Repeat-while loop
suggest changeSimilar 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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents