b = {} , do b[i] = i end -- method one for i, v in pairs(b) do print (i, v) end -- method two for i, v in ipairs(b) do print (i, v) end -- method three , #b do print (i, b[i]) end -- method four , table.maxn(b) do print (i, b[i]) end lua常用的四种遍历,前两种是泛…