0

Newline

This code gives the output as '3131'.How can I bring the second 31 to the next line?Will the newline function not serve the purpose here?

1st Sep 2017, 10:20 PM
Adrija Ray Chaudhuri
Adrija Ray Chaudhuri - avatar
1 Resposta
0
var person = { name: "John", age: 31, favColor: "green", height: 183 }; var x = person.age; var y = person['age']; document.write(x); document.write(y);
1st Sep 2017, 10:30 PM
Adrija Ray Chaudhuri
Adrija Ray Chaudhuri - avatar