Javascript Study Notes - Pseudo-classes and Inheritance
Inheritance in Javascript can be divided into two main categories (non-constructor inheritance and constructor inheritance). Let’s start with the simpler one and get to know constructor-based inheritance. Javascript is a prototype-based language and does not have the concept of classes inherently, so we can only simulate class-based patterns to implement classes and class inheritance. We use constructor functions to simulate the concept of classes. For example, let’s define a Person class. ...