7 Let's Learn Return


#1

Hi, my code went through, however, the console prints out "wrong number of arguments (1 for 2)" instead of an answer. How should I word this correctly?

def add(n1, n2)
return n1 + n2

end
add (4 + 6)


#2

For reference, please just iput below:

def add(n,m)
sum=n+m
return sum
end


#3

Thank you! Question: what is the best way to add the sum of an array?