+ 10
Ruby again!!
what is the difference between puts and print?! i see when i learning ruby that both of them used to display the results of evaluating ruby code. but i think it is impossible to use them in same purpose.. is there any differnet?! *additional tags
3 ответов
+ 6
Your title there!!!
Puts is like(not the same) print but it adds a new line character(\n) after your text.
Print just prints text without adding a new line.
Puts "look! The text after this will have a new line character", "on next line"
Print "no new line after this text", "on same line"
+ 4
thanks my friend <3 @Lord