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! While you're at it, check out some resources Treehouse students have shared here.
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 trialMonica Kornis
Courses Plus Student 1,132 PointsHow to create a method named an argument?
See the code below. What errors are occurring in my argument?
def hello
puts "Hello i am #{name}"
name = Monica
end
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHey Monica,
You seem to have way more code that what the challenge is asking for. It didn't ask for a puts
statement and didn't ask for a variable to be defined.
The challenge only wants you to define a method named "hello" that takes one argument.
Below is the corrected code for your reference. If it doesn't make sense, I do strongly recommend rewatching the first two videos of the course before moving on, as this is fundamental in what is to follow. :)
def hello(arg)
end