How to get output in different lines. | Sololearn: Learn to code for FREE!
0

How to get output in different lines.

var x = 1; document.write(x); var age_1 = 5; var age_2 = 5; var age = age_2 + age_1; document.write(age); The output is 110 How do i get 1 and 10

25th Jan 2019, 10:24 PM
Sagar Karki
Sagar Karki - avatar
5 Answers
+ 4
therefor you need the HTML <br/> (breakline) tag. document.write(x+"<br/>"+age); Or with the new ES6 way (which I use a lot document.write(`${x}<br/>${age}`);
25th Jan 2019, 10:30 PM
Roel
Roel - avatar
+ 3
Sagar Karki don't take these virtual achievements such as badges too serious, the only takeaway is your coding skill.
25th Jan 2019, 11:01 PM
Gordon
Gordon - avatar
+ 3
But not sololearn badge, sololearn experience, sololearn level, these are virtual, they cannot help you in your real life.
25th Jan 2019, 11:06 PM
Gordon
Gordon - avatar
0
Gordon with skills i hav to do achievements
25th Jan 2019, 11:03 PM
Sagar Karki
Sagar Karki - avatar
0
Ok thank you for your suggestions.:)
25th Jan 2019, 11:07 PM
Sagar Karki
Sagar Karki - avatar