+ 3
Why the new line "\n" not working!
I have added the following variable var y = 2; document.write(x); document.write("\n y = "); document.write(++y); but the output is in the same line
3 Respuestas
+ 11
var x = 3;
var y = 2;
document.write(x);
document.write("<br>y = " + ++y);
You can't use "\n" for document.write( ) method, fix it.
EDIT -
@Rrestoring won the race for 3 seconds. :3
+ 5
You can use <br /> for new lines in html. Html ignores white space so \n doesn't APPEAR to do anything.
Edit :
@Maz rekt 😝 😶
+ 2
Thanks