+ 1

Is there anyway to print var x & var y on different lines?

var person = { name: "John", age: 31, favColor: "green", height: 183 }; var x = person.name; var y = person['age']; document.write(x); document.write(y);

6th Sep 2017, 8:51 AM
Adrija Ray Chaudhuri
Adrija Ray Chaudhuri - avatar
1 Réponse
+ 3
Add in between the 2 lines: document.write("<br>");
6th Sep 2017, 8:59 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar