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 46,156 Points

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