Numeric for and while.
Goal
Print a running total.
local total = 0
for i = 1, 5 do
total = total + i
print(i, total)
endfor i = 1, 3 do
print(({"Nairobi", "Mombasa", "Kisumu"})[i])
endlocal units = {12, 8, 5}
local i = 1
while i <= #units do
print(units[i])
i = i + 1
endfor _, city in ipairs({"Nairobi", "Nakuru", "Eldoret"}) do
if city == "Nakuru" then break end
print(city)
end