Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Takuji Sakashita3,372 Points
Create a method called hello that takes one argument.
what should i do to answer this question?
def hello(a,b) puts a+b end
Jason AndersTreehouse Moderator 145,855 Points
Your code is correct syntactically, but it is not what the challenge asked for. The challenge wants you only to
Create a method called
hellothat takes one argument.
But, in your code, the method has 2 arguments instead of just one as per the instructions.
Second, the challenge just want a method, it did not ask for a
puts statement or anything else to be inside the body of the method.
If you fix those two things up, the code will pass. :)