Values & References6 / 10
Up next

Pass a table to a function

-- a function receives the reference, so it can mutate it
local function append_zero(t)
  table.insert(t, 0)
end
local nums = {1, 2, 3}
append_zero(nums)
print(#nums)
What you're solving

the callee shares the same table