Loops (for / while)
Numeric for (end INCLUSIVE), iterating tables with ipairs, and while.
Simple enough for a 5-year-old to understand
Numeric for
for i = 1, 5 → from 1 to 5 (BOTH INCLUDED). Unlike other languages!
for i = 1, 3 do print(i)end🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 1
2
3
4
5