Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
base = {name="Rocket Skates", price=12.75, color="yellow"}
|
||||
update = {price=15.25, color="red", year=1974}
|
||||
|
||||
--[[ clone the base data ]]--
|
||||
result = {}
|
||||
for key,val in pairs(base) do
|
||||
result[key] = val
|
||||
end
|
||||
|
||||
--[[ copy in the update data ]]--
|
||||
for key,val in pairs(update) do
|
||||
result[key] = val
|
||||
end
|
||||
|
||||
--[[ print the result ]]--
|
||||
for key,val in pairs(result) do
|
||||
print(string.format("%s: %s", key, val))
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue