local a = {"Ariel", "Barbie", "Clara"}
table.insert(a, 3, "Zelda")
print("-----------------")
for k, v in pairs(a) do
print(k, v)
end
table.remove(a, 2)
print("-----------------")
for k, v in pairs(a) do
print(k, v)
end
table.remove(a, 1)
print("-----------------")
for k, v in pairs(a) do
print(k, v)
end
Wednesday, May 16, 2012
table.insert(), table.remove()
Labels:
Lua
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment