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 trialAustin Hess
1,158 Pointswhen I run this code in the console, it does not give me an answer.
Method arguments - I have the same code as shown in the video. When i type "ruby methods.rb", it does not give me the answer.
2 Answers
kabir k
Courses Plus Student 18,036 PointsSince you are referring to the "Method Argument" video, I believe you can fix the issue with the following.
In the file, methods.rb,
1) define the method properly with the necessary keywords: def and end
AND
call it
For example,
def add(a, b)
puts a + b
end
add(2, 3)
2) make sure you save the file
3) then run the file again in the console
Hopefully, this helps.
jesus acevedo
1,402 PointsI am getting the same problem. I have saved the file and still get a sintax error.
Luke Fritz
10,255 PointsLuke Fritz
10,255 PointsCan you, please, edit your question to include the actual code here, so that we can see your code without having to review the video?