JavaScript

Prototype

Definition

Every JavaScript object has a hidden internal property called `[[Prototype]]` that links to another object. When a property is accessed on an object and not found, JavaScript walks up the prototype chain to find it. This is the basis of JavaScript's inheritance model.

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms