Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You should care about the prototype property for four reasons.
The first reason is that the prototype
property is used by the native constructor functions (e.g., Object(), Array(), Function(), etc.) to allow constructor
instances to inherit properties and methods. It is the mechanism that
JavaScript itself uses to allow object instances to inherit properties
and methods from the constructor function’s prototype property. If you want to
understand JavaScript better, you need to understand how JavaScript
itself leverages the prototype
object.
When creating user-defined constructor functions, you can orchestrate inheritance the same way JavaScript native objects do. But first you have to grok how it works.