Lua tables

This article is tagged with: Lua tables and lua

lua tables

local favoritefoods_table = {"hamburger", "spaghetti", "pizza", "potato chips"}
--the table--
for i, v in pairs(favoritefoods_table) do --loop through the table--
print(i) --print the number--
print(v) --print the value--
end

lua tables

local Table = {
["TABLE_info"] = "TABLE_response"
}
for i, v in pairs(Table) do
print(v)
end

This article is tagged with: Lua tables and lua