--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
-- // Tables
local t = {"foo", "bar"}
--[[
// Output:
1 foo
2 bar
--]]
for i,v in pairs(t) do
print(i,v)
end
-- // Dictionaries
local t = {
["A"] = "Me",
["B"] = "You"
}
--[[
// Output:
A Me
B You
--]]
for i,v in pairs(t) do
print(i, v)
end