REPEAT Loops
A repeat loop performs the test condition at the end of every loop and will execute at least one loop.
m = 0 repeat m = m+1 print("Repeat loops check the condition at end, and stops if it is true.") print("The value of m is " .. m) if (math.random()*10 > 5) then print("A random number larger than 5 was generated. Terminating the loop early.") break -- breaks out of the loop early end until m == 5