Ruby Ruby Basics Ruby Syntax Defining Methods

calling a method

Need help please

hello.rb
def say_hi
  puts "hi"
end

3 Answers

Antonio De Rose
Antonio De Rose
20,852 Points
def say_hi
  puts "hi"
end

#so far so good, missing one line of code.
#you have defined  the function, correct.
#the question now, have asked to call the function.

yeah but how to call on it

Antonio De Rose
Antonio De Rose
20,852 Points

one video before this challenge, if you go through it, and in the video get to 2 minutes and 28 secs, the teacher explains well, how to define a method and how to call it

method one definition - wait lines 1 to 5

calling of the "wait" method line 14

or else at a glance in the same video if you look at the teachers notes, you can get idea