Ruby


#1

Many times after I submit a command through the ruby editor, 'nil' appears after the processed statement. Is that suppose to happen or did I mess something up?


#2

No, it's completely normal.

In codecademy console or in irb (interactive ruby) your scripts will print to the console return value of the last evaluated expression.

So, if this expression is for example print - it will return nil. nil, from nihil -> the absence of anything.

You can always check in the documentation what is the return value of given expression.