Values & References9 / 16
Up next

Mutation through a reference

# the parameter references the caller's array
def append_zero(list)
  list << 0
end

nums = [1, 2]
append_zero(nums)
p nums
What you're solving

a method sees the same object