Why does <"Sean".downcase> print to the screen without <puts> or <print>?


#1

In exercise 9 of the first Ruby section, I am able to see an output by simply typing "Sean".downcase without having typed or . Is that normal or a codecademy thing?


#2

Hey, that is because of the Ruby interpreter. It evaluates everything you type. You can try it out in your computer if you have the interactive Ruby interpreter called IRB:

nbk@somewhere:~/dev/Ruby/codeacademy$ irb
irb(main):001:0> "Sean".downcase
=> "sean"

You can think of it this way: everything in Ruby is evaluated.