Introduction to Object Prototypes
Object prototypes
Prototypes are the mechanism by which
JavaScript objects inherit features from one another. In this article,
we explain what a prototype is, how prototype chains work, and how a
prototype for an object can be set.
Prerequisites: | Understanding JavaScript functions, familiarity with JavaScript basics (see First steps and Building blocks), and OOJS basics (see Introduction to objects). |
---|---|
Objective: | To understand JavaScript object prototypes, how prototype chains work, and how to set the prototype of an object. |
Source: Mozilla, https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.