📜  for i in pairing lua 代码示例

📅  最后修改于: 2022-03-11 14:54:54.043000             🧑  作者: Mango

代码示例2
local table =  {2,3,12, "Hello"} --a simple array
for i, item in pairs(table) do -- for i in pairs loop goes through all the items in an array/table
    print(item)
end