why i get this [object Object] and not just "object" i.e. just its type?
var person = {
firstName: "John",
lastName: "Doe",
age: 50,
eyeColor: "blue"
};
var person;
document.getElementById("demo").innerHTML = person + "<br>" + typeof person;
<p>Variables can be emptied by setting the value to <b>undefined</b>.</p>
<p id="demo"></p>