Java Reference
In-Depth Information
Distance of Point(100, 200) from ColoredPoint(25, 50, red) = 167.71
Distance of ColoredPoint(25, 50, red) from Point(100, 200) = 167.71
Figure 4-2 depicts the prototype chain of the Point and ColoredPoint functions and
their objects. The figure may seem intimidating at first. Once you understand the linking
of an object with its prototype using the __proto__ property and the prototype property
of a function, the rest is linking of the objects by their references.
Figure 4-2. The Prototype Chain for the Point and ColoredPoint Functions and Their Objects
 
Search WWH ::




Custom Search