end1 = "C"
end2 = "h"
end3 = "e"
end4 = "e"
end5 = "s"
end6 = "e"
end7 = "b"
end8 = "u"
end9 = "r"
end10 = "g"
end11 = "e"
end12 = "r"
puts end1, end2, end3, end4, end5, end6, end7, end8, end9, end10, end11, end12
Does the comma mean the next string would be printed on the next line of the previous string?
The comma separates the arguments of the call to the
putsmethod. In other words theputsmethod is called with 12 arguments here.The
putsmethod is defined to print out each argument followed by a line break (unless the given string already ends with a line break), so yes, each string will be printed on a separate line.If you want to print each string on the same line, you can use the
printmethod instead ofputs.