Values & References10 / 16
Up next

Rebinding a parameter

# assigning the parameter rebinds the local name only
def reassign(list)
  list = [99]
end

nums = [1, 2]
reassign(nums)
# the caller's array is untouched
p nums
What you're solving

reassignment stays local