In In We notice that the loop condition judgment statement If the conditional judgment statement ( Lua programming language repeat...until , a loop statement is different from for and while cycle for and while , the conditional statement of the loop is judged at the beginning of the execution of the current loop, while repeat...until conditional statement of the loop is judged after the end of the current loop. 4.9.1. Grammar #
Lua programming language repeat...until circular syntax format:repeat statements until( condition )
condition at the end of the loop body, so the loop body executes once before the condition is judged. condition ) for false the loop restarts execution until the conditional statement ( condition ) for true will stop the execution.