-- 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)
reassigning the name does not reach the caller