Greeting not printing in console


#1


Exercise 3 - Create Your Own

I am trying to create my own greeting as follows:

Looks simple enough but something is wrong because I just see nil in the console.

Can anyone help me please?


def greeting
    puts "good morning"
end


#2

HI do you still have this part

# Define your method above this line.

greeting # Ignore this for now. We'll explain
         # it in the next exercise!

of code?


#3

Only the first one. I removed the greeting bit.


#4

you shouldn't remove it ....like the comment says.


#5

Now it worked :slight_smile:

Thank you for your help. Good to know that I should not remove the comments.


#6

it's not the comment that you shouldn't remove it was that

greeting