tb1 = {[2] = "123", [5] = "456", [9] ="789"}
print(#tb1) 0
for i, key in pairs(tb1) do
print(key)
end
for i, key in 1pairs(tb1) do
print(key)
end
tb1 = {[2] = "123", [5] = "456", [9] ="789"}
print(#tb1) 0
for i, key in pairs(tb1) do
print(key)
end
for i, key in 1pairs(tb1) do
print(key)
end
转载于:https://www.cnblogs.com/yxc6123/p/5833647.html