0

How to break lines in JavaScript?

22nd May 2017, 5:51 PM
Bikash Thapa
Bikash Thapa - avatar
3 Respostas
+ 7
<br> tag For example: document.write ("Hello <br>World"); //Output: Hello World
22nd May 2017, 6:08 PM
Pixie
Pixie - avatar
+ 2
Thanks! How about breaking lines in number? Eg.: var price = 55.55 document.write(price); var price = 77.77 document.write(price); if run the above code, it will gives 55.5577.77 I want it to appear as: 55.55 77.77 Thanks in advance
26th Jun 2017, 12:08 AM
Mark Yeong
Mark Yeong - avatar
+ 1
\n just before the first letter of the word/sentence you want to go on the next line.
22nd May 2017, 6:08 PM
Elias Papachristos
Elias Papachristos - avatar