(__proto__
property refers to the actual prototype of an object.)
Object
is a function (and also used as a constructor).
Since it is a function, it's constructor should be Function
.
So, if I wanted some property added to Object
, I could add it to Function.prototype
.
But, Function
is an object and all objects inherit from Object
in some way.
Is this actually a cyclic relation?
I read this in an MDN page :
(some function) ---> Function.prototype ---> Object.prototype ---> null
How can null
be the __proto__
of Object
? Isn't it Function.prototype
again?