Translations:Extension:Scribunto/Lua reference manual/1446/en

This first form of the for loop will declare a local variable, and repeat the block for values from exp1 to exp2 adding exp3 on each iteration. Note that exp3 may be omitted entirely, in which case 1 is used, but non-numeric values such as  and   are an error. All expressions are evaluated once before the loop is started.