0

Adding a html <br> between variables in JS?

I'm trying to write two variables on separate lines. I tried using <br> to move a variable to a separate line, but it didn't work? https://code.sololearn.com/Wjze6kgY0ppf/?ref=app

17th Nov 2017, 2:51 PM
Howard Eugene Patrick Jr
Howard Eugene Patrick Jr - avatar
3 ответов
+ 1
use var a = "one"; var b = "two"; document.write(a + "<br />" + b);
17th Nov 2017, 2:59 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
0
thank you, fixed it. document.write(x,"<br>",y);
17th Nov 2017, 3:34 PM
Howard Eugene Patrick Jr
Howard Eugene Patrick Jr - avatar