whileLoops as long as the condition is true.Syntaxwhile condition do ... endDescriptionRepeats the block as long as the condition is met.ExampleLoading editor…▶ Try it yourselfExpected output0 1 2When to use?Indefinite repetition.Related commandsfor (numeric)← ipairs / pairs