In Js ,why document object is displayed in such a different manner unlike other objects

if we do:console.log(typeof document) we’ll know document is an object

I suppose object should be shown in format:

 object_name{property1:value1,property2:value2,...}

Anyway ,for document object if we simply do console.log(document) then we’ll be shown results in following format :

<!DOCTYPE html>
<html>
<head></head>
<body></body>
</html>

why is document displayed in such a peculiar manner ?

77 thoughts on “In Js ,why document object is displayed in such a different manner unlike other objects”

Leave a Comment