In JavaScript , how to use \n in strings?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In JavaScript , how to use \n in strings??

12th May 2019, 7:29 AM
Supriya Pundir
Supriya Pundir - avatar
1 Answer
+ 2
It breaks the line, just like pressing enter when writing. Only thing is: you have to use <br> when working with HTML.
12th May 2019, 7:50 AM
Maneren
Maneren - avatar