R Repeat and Break
repeat loops forever until break. It suits loops where the exit condition is checked in the middle.
Example
n <- 0
repeat { n <- n + 1; if (n >= 3) break }
print(n)Exercise
Leave the loop.
if (x) Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.