Skip to content

Opening book details…

About this document

JavaScript Inheritance Explained by m s reddy is a document available to read on EtoBox.

This document summarizes inheritance in JavaScript using prototypes. It explains that JavaScript uses prototype chaining rather than classes, and prototypes allow objects to inherit properties from other objects. It provides an example of defining SuperType and SubType constructor functions, with SubType inheriting properties from SuperType by setting SubType.prototype to an instance of SuperType. It also demonstrates adding a new method to SubType.prototype and creating an object with the SubType construct

Author
m s reddy
Language
EN