React: Building Modern Web Applications
by Jonathan Hayward, Artemij Fedosejev, Narayan Prusty, Adam Horton, Ryan Vice, Ethan Holmes, Tom Bray
Object
ES6 standardizes the __proto__ property of an object and adds new properties to the global Object object.
The __proto__ property
JavaScript objects have an internal [[prototype]] property that references the object's prototype, that is, the object it inherits. To read the property we had to use Object.getPrototypeof() and to create a new object with a given prototype we had to use the Object.create() method. A [[prototype]] property cannot be directly read or be modified.
Inheriting was cumbersome due to the nature of the [[prototype]] property, therefore some browsers added a special __proto__ property in objects, which is an accessor property that exposes the internal [[prototype]] property and makes working with prototypes easier. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access