I’m trying to make a program that requires text with line breaks and superscript elements. I’m trying to figure out how to use up less lines with making the text.
For instance, this is how 2 lines seperated by 2 line breaks are written in my code.
textblock.appendChild(document.createTextNode("this is the first line."))
textblock.appendChild(document.createElement("br"))
textblock.appendChild(document.createElement("br"))
textblock.appendChild(document.createTextNode("this is the second line."))
I’m wondering if I could somehow make this all one line.
New contributor
FastFire is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.