t1a08: Loops by Innes

W3Schools JavaScript For Loop Reference

Example for input output

JavaScript:
for (let myLoop = 0; myLoop < myMax; myLoop++) {
    // code or smth
}

Luau:
for myLoop = 0, myMax - 1 do
    -- code or smth
end

Example code




Basic For Loop with Decisions

Even Number Identifier

...

Luau Code Editor

Edit the Luau code and press Run Luau. The code reads the maximum loop count and weird number from the inputs above.


Luau Output