for in lua 5.4 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 key, value in pairs(t) do
print(key, value)
end