+ 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

24th Jun 2020, 10:02 AM
Namit Jain
Namit Jain - avatar
4 Answers
+ 2
Instead of "\n" use "<br>"
24th Jun 2020, 10:14 AM
Abhay
Abhay - avatar
+ 4
😉 Krishna đŸ€˜ Are you not able to see my code? I have tagged it
24th Jun 2020, 10:05 AM
Namit Jain
Namit Jain - avatar
24th Jun 2020, 10:34 AM
Gordon
Gordon - avatar
+ 1
Abhay Thank you so so much!!!!!!🙏🙏🙏🙏 But why doesn't \n work in my code?
24th Jun 2020, 10:27 AM
Namit Jain
Namit Jain - avatar