Code Editor
Learn
Introduction to Ruby

'puts' and 'print'

The print command just takes whatever you give it and prints it to the screen. puts (for "put string") is slightly different: it adds a new (blank) line after the thing you want it to print. You use them like this:

puts "What's up?" print "Oxnard Montalvo"

No parentheses or semicolons needed!

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.