7 let's learn return


#1

def add(*n)
n.each { |n| puts "#{n}" }
return n *= n
puts n
end
add(7)
i pass the task but it's says : can't convert Array into Integer?
what this about ?


#2

I'm not sure what you're trying to do, the instructions say "Define a new method called add that takes two numbers as arguments." You are only taking one, and you aren't returning the sum, so I'm not sure what you're thinking.


#3