Introduction To Classes & Objects
Classes and Objects were not part of JavaScript until ES6
A class is like a template or a blueprint based on which we will create real-world like Objects
Classes & Objects
Creating a Class
The following example represents how to create a class in JavaScript
Constructor In JavaScript Classes
The goal of the constructor is to basically initialize the parameters of the object
This keyword in JavaScript Classes
this will refer to the current class object when used inside a class
Creating an object in JavaScript we use the new keyword
Inheritance in JavaScript
The super keyword will call the parents Constructor