Циклы


-- Цикл While

a=1
while a<5 do
    a = a + 1
    if a==4 then break end
end

-- Цикл Repeat
a = 10
repeat
   a = a - 1
until a==1

-- Цикл For
for i = startValue, stopValue, step do
   print(i)
end