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 trialDerek Hutson
9,740 PointsWeird question.. what am I doing wrong?
Hi all, I keep getting a syntax error and not sure why.. Thanks for help!
def three(3)
end
def five(5)
end
1 Answer
matth89
17,826 PointsHey Derek. In this challenge you're being asked to return 5 and 3 respectively in your two functions. Right now you're passing in 5 and 3 as parameters to your functions. Instead of passing in the numbers as parameters, use the return keyword inside the body of your functions. Syntax example:
def ruby_func()
return value
end
I hope this clears things up!
Derek Hutson
9,740 PointsDerek Hutson
9,740 PointsGot it.. asking for no argument threw me off so I didn't put anything in the body!