6/19. Splat


#1

Im confused...could someone please help me? I don't know how i should put the parameters in cuz it isnt working ...Heres the code.

def add(n)
return n + 3
end

output = add(5)
output += 3
puts output


#2

don't follow the example.

So what you have to do is set two arguments.

you only have one argument.

For example: def add(n)
* n is your argument.

so add another argument as an array-like entry.

For example: def add(n, a)

Here's my code:

def add(n, a)
return n + a
end

puts add(2, 4)


#3

Thank you that makes things way easier...