How does the Ruby code ; print ("My") print ("first") puts ("program") works?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How does the Ruby code ; print ("My") print ("first") puts ("program") works??

-----All..the above functions used..print, puts are in different lines!

8th Oct 2020, 8:00 AM
Arush Chauhan
1 Answer
+ 2
print() doesn't add a newline character at end of string. puts() adds newline charecter.
8th Oct 2020, 8:02 AM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar