Why is Object .__ proto __.__ proto__ not null?

I understand that Object.__proto__ is a top level prototype in javascript. I would like its __proto__ to be zero, but in Google Chrome (not tried other browsers) this is not the case. Why is this?

Edit

I know that the following image is probably a re-hash below, but I did it myself to test my understanding. Is there something wrong with this? enter image description here

+6
source share
2 answers

Object is a function, it __proto__ is an empty function() {} . The root object is an empty object {} , not an Object . So, when you have an object like {foo:1, bar:1} , its relationship looks like this:

enter image description here

+6
source

I think you are mistaken Object.__proto__ for Object.prototype .

Object.prototype.__proto__ indeed null because Object does not extend anything.

Object itself, however, is a function - aka. Function instance.
Because Function extends Object , the prototype has the __proto__ property.
That way you can traverse more than Object.__proto__.__proto__ to reach Object.prototype , in fact:

 Object.prototype === Object.__proto__.__proto__ // should yield true 
+5
source

All Articles