lua for loops object code example
Example 1: lua loop through table
local Table = {'Cat', 'Dog', 'Bird'}
for i, v in pairs(Table) do
print(i .. ' ' .. v)
end
Example 2: lua in pairs
--Table is the table to iterate through
--Index is the current index
--Value is the value at the current index
for index, value in pairs(table) do
end