JavaScript

Inheritance

Definition

A mechanism where a class (child) derives properties and methods from another class (parent). In JavaScript, inheritance is achieved through the prototype chain or the `extends` keyword with ES6 classes.

Code Example

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

Learn More

Related Terms