Control Structures


Lua implements several of the basic control structures that might be expected in a programming language. Here is a quick summary of the available options, then we will get into the details in the coming sections:

Control Type Structure
Conditional If-Then
Condition-controlled Loop While
Condition-controlled Loop Repeat
Count-controlled Loop Numeric For
Collection-controlled Loop Generic For