To print "welcome back!" in Ruby, you can use the puts
keyword followed by the text you want to print, like this:
main.rb21 chars2 lines
Alternatively, you can use print
in place of puts
:
main.rb22 chars2 lines
Both puts
and print
will output the text to the console followed by a newline character at the end. The difference between the two is that puts
adds an extra newline character, while print
does not.
gistlibby LogSnag