Can anybody explain/elaborate on the following:
I have checked this on console.
Function.prototype
and Function.__proto__
point to the same object. It is also the same object that is referenced by Object.__proto__
.
Any custom function that you write or even the built-ins one (Array,String,Number) , have their .__proto__
point to this object.
Checking Function.prototype on console returns:
ƒ () { [native code] }
Interestingly, this object's .__proto__
point to Object.prototype
object.
I do understand that Object.prototype.__proto__
is null which is where the prototype chain stops.
Found the image here