All of the attempts to emulate class-copy behavior described
previously in Chapter 4, labeled as variations of mixins, completely
[[Prototype]] chain mechanism we examine here in this
[[Prototype]], which is simply a reference to another
object. Almost all objects are given a non-
null value for this
property, at the time of their creation.
Note: we will see shortly that it is possible for an object to have an
[[Prototype]] linkage, though this is somewhat less common.
What is the
[[Prototype]] reference used for? In Chapter 3, we
[[Get]] operation that is invoked when you reference a
property on an object, such as
myObject.a. For that default
operation, the first step is to check if the object itself has a
a on it, and if so, it’s used.
ES6 Proxies are outside of our discussion scope in this book
(they will be covered in a later book in the series), but everything we
discuss here about normal
[[Put]] behavior does not
apply if a
Proxy is involved.
But it’s what happens if
a isn’t present on
myObject that brings
our attention now to the
[[Prototype]] link of the object.
[[Get]] operation ...