+ 5

How do I print the document write in message in next line

https://code.sololearn.com/WwPQptlFVuLw/?ref=app

18th Jun 2019, 1:21 AM
John Dhinakar
John Dhinakar - avatar
4 Answers
+ 5
Can I give my output to next line like by using /n?
18th Jun 2019, 1:40 AM
John Dhinakar
John Dhinakar - avatar
+ 5
But I am not updating anything..I have just assigned a value...how do I print it in next line is what i really want to know...I did not come to DOM in my javascript course
18th Jun 2019, 2:11 AM
John Dhinakar
John Dhinakar - avatar
+ 3
Please don't use document.write to update webpage, use DOM document access functions instead. To update body content, you could use document.body.innerHTML. To update id element, you could use document.getElementById.innerHTML
18th Jun 2019, 2:09 AM
CalviŐ˛
CalviŐ˛ - avatar
+ 2
You want to add line breaks to your javascript like this so that it breaks to the next line https://code.sololearn.com/WA9V9RK99nKx/?ref=app
18th Jun 2019, 1:38 AM
Ryan Lusby
Ryan Lusby - avatar