Sololearn: Learn to Code
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 3
document.write("Hello"); document.write("<br/>"); document.write("World"); <br/> is used to break line in html. You are using document.write means it will write your data in html webpage, thatswhy \n is not working. \n work on console in browser.
23rd Nov 2016, 2:26 PM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 1
:) Try to add document.write("<br/>"); between the lines.
23rd Nov 2016, 2:01 PM
Ondřej Doněk
Ondřej Doněk - avatar