lua loop code example
Example 1: lua for loop
for k,v in pairs(tbl) do
print(k)
print(v)
end
for i=0, num do
print(i)
end
Example 2: lua while loops
while true do
print("Looped Text")
wait(1)
end
Example 3: lua how to make a loop
for init,max/min value, increment
do
statement(s)
end
Example 4: For loop lua
for startValue, EndValue, [increments] do
end
Example 5: for loop lua
local t = {}
for index, value in ipairs(t) do
print(index, value)
end
Example 6: for loop lua
for x = 0, 10, 1 do
print(x)
end