for do lua code example
Example 1: For loop lua
for startValue, EndValue, [increments] do
--code to execute
end
--The increments value is optional. If it isn't defined, it is assumed to be "1"
Example 2: for loop lua
local t = {}
for index, value in ipairs(t) do
print(index, value)
end
Example 3: for loop lua
for x = 0, 10, 1 do
print(x)
end