__proto__ in ECMAScript 6
The property __proto__ (pronounced “ dunder proto ”) has existed for a while in most JavaScript engines. This blog post explains how it worked prior to ECMAScript 6 and what changes with ECMAScript 6. For this blog post, it helps if you know what prototype chains are. Consult Sect. “ Layer 2: The Prototype Relationship Between Objects ” in “Speaking JavaScript”, if necessary. __proto__ prior to ECMAScript 6 Prototypes Each object in JavaScript starts a chain of one or more objects, a so-called prototype chain . Each object points to its successor, its prototype via the internal property [[Prototype]] (which is null if there is no successor). That property is called internal , because it only exists in the language specification and cannot be directly accessed from JavaScript. In ECMAScript 5, the standard way of getting the prototype p of an object obj is: var p = Object.getPrototypeOf(obj); There is no standard way to change the prototype of an existing object, but you can ...