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 trial

Ruby Ruby Basics Ruby Syntax Method Return Values

MaryAnn Eleanya
MaryAnn Eleanya
8,626 Points

The method name is not returning any number

For some reason whenever I call my method name, no answer is returned,

methods.rb
def three(number)
puts number
end

def five(number)
  puts number
end

 three(3)
 five(5)

2 Answers

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

Also, if the last line in your three method is a call to puts, then your method will return nil. Same thing for the five method. You should review this section of the preceding video before continuing with the course.

Clayton Perszyk
MOD
Clayton Perszyk
Treehouse Moderator 48,850 Points

The challenge is expecting that you return the numbers 3 and 5, not passing them as arguments.