Fundamentals4 / 14
Up next

Numeric for

-- numeric for: start, stop (inclusive), optional step
local total = 0
for i = 1, 5 do
  total = total + i
end
print(total)
-- a negative step counts down
for i = 3, 1, -1 do
  print(i)
end
What you're solving

for i = start, stop, step