Values & References9 / 10
Up next

Rebinding a parameter is local

-- assigning a new table to the parameter only rebinds the local
local function replace(t)
  t = {9, 9, 9}
  return t
end
local nums = {1, 2, 3}
local result = replace(nums)
print(#nums, #result)
What you're solving

reassigning the name does not reach the caller