When a new function is created a new property is added to it. That property is named prototype. It's an object and initially has two properties:
- constructor: which points to the function itself;
- __proto__
When a new function is created a new property is added to it. That property is named prototype. It's an object and initially has two properties:
dunder proto === __proto__
Every object in JS has this property.
It points back to the prototype object of the constructor function that created that object.
Only Object.prototype.__proto__ === null
This is the object which is created from a constructor function.
Todo