I have been reading on the
No. The hidden property is called [[prototype]].
.__proto__ is a deprecated getter that accesses it, you should use
which by default points to
"default" might be misleading - it depends on how the object is created. For plain object literals, yes, it's
Now when an instance of an object is created using new. The value of this property is modified and is assigned the object
ConstructorName.prototype. I am not sure what the default value of
__proto__is before new is called.
There is no value before that. The object is created with the prototype being set from the very beginning. Before
new is called, there is no object.
.constructorI am a little confused I read this and so far believe that constructor property by default is empty and when new is invoked the constrcutor is modified and assigned
No, nothing is assigned anywhere, there is no
.constructor property on instances. They do inherit the property (along with others) from the
ConstructorName.prototype.constructor property is created right in the instance where the
ConstructorName function is created.