+ 10
[SOLVED] Problem with \n in Javascript!
I am using \n but it is not working!! Everything is printed in the sameline! Please help! And pls tell how to preserve spaces in js just like <pre> in html!! https://code.sololearn.com/W07Y3KGgj8o3/?ref=app
4 Answers
+ 2
Instead of "\n" use "<br>"
+ 4
đ Krishna đ€ Are you not able to see my code?
I have tagged it
+ 2
Try pairing \n with innerText
https://www.sololearn.com/post/112468/?ref=app
https://code.sololearn.com/WKKkpq0efxai/?ref=app
+ 1
Abhay Thank you so so much!!!!!!đđđđ
But why doesn't \n work in my code?