JavaScript Classes
JavaScript classes were introduced in ECMAScript 2015(ES6). They are primarily syntactical sugar over JavaScript’s existing prototype based inheritance.
The constructor
method is a special method for creating and initializing an object created with a class.
A constructor
can use the super
keyword to call the constructor of the super class.
Sub classes can be created with extends
keyword.
References
Categories :
JavaScript
ES6