Imagine simple function:
function Person();
I know that Person has __proto__ property that references to Function.prototype.
I also know that Person has prototype property. When I write:
function Person() {}, a new prototype object is automatically created:
Person.prototype = { constructor: Person };
but inside Person.prototype block, I also have __proto__, so what is this __proto__, when is it created, who creates it?
I may know that it's Object's prototype but is it always so?
Function.prototype, and all instances of objects created by these constructors have prototype chains that drill down toObject.prototype.__proto__is a pseudo-property (technically a getter/setter onObject.prototype) exposing the internal[[Prototype]]object. So even{}(an "empty" object) has a__proto__property...