Mega Code Archive

 
Categories / Ruby / Development
 

Print Statement

# puts statement goes to the next line after printing the contents # print statement the cursor is positioned on the same line puts "Hello World" puts "Good Morning" # The output of this code is: # Hello World # Good Morning # Now let's use the print statement and see what the output will be: print "Hello World" print "Good Morning"