Correct, __proto__
is not a part of the specification. But still, we can use getPrototypeOf
which does the same. So in your example:
Object.getPrototypeOf(pluto) === dog
You are viewing a single comment's thread from:
Correct, __proto__
is not a part of the specification. But still, we can use getPrototypeOf
which does the same. So in your example:
Object.getPrototypeOf(pluto) === dog
Exactly. The new functions make those old mechanisms unnecessary, and I think they look ugly with all those underlines.
I think the major advantage of this "proto" property is the key role in javascript property delegation mechanism learning process, as we can quickly navigate prototype chain objects using it. Nothing more.