While the actual object prototype link is an internal property, i.e. it's implementation dependent to allow for optimization, Firefox's JavaScript engine SpiderMonkey exposed it with __proto__ which was soon copied by other browsers.
ES2015:
1.) deprecates __proto__
2.) turned __proto__ into a getter/setter.
prototype
is the property you set on a constructor function - any objects created vianew
will have that object as their prototype.While the actual object prototype link is an internal property, i.e. it's implementation dependent to allow for optimization, Firefox's JavaScript engine SpiderMonkey exposed it with
__proto__
which was soon copied by other browsers.ES2015:
1.) deprecates
__proto__
2.) turned
__proto__
into a getter/setter.__proto__ in ECMAScript 6
Now if you want to get the prototype of an object use Object.getPrototypeOf() and you can create an object with a prototype with Object.create()
JavaScript's prototypal inheritance is based on Self.