Case I: (Any general object)
Obj1 = {
name: "Jack",
age: 21,
address: {
city: "New York",
street: "Black Street",
house_no: 39
}
}
Now, on console.log(Obj1.address)
I will get:
{
city: "New York",
street: "Black Street",
house_no: 39
}
Case-II: Window.document
Applying same logic - First I will do console.log(window)
, then console.log(window.document)
. But, now I don't get the proper structure of window.document (which I should get ideally), but rather I am getting 'dom-structure' (which I should not ideally get).
Now, can someone tell me why is this happening? How to get proper structure inside window.document and not the html dom?
console.log(window);
console.log(window.document);
Now, Can someone please help me understand the issue of why 'window.document' is not providing proper structure of object -- which it should?