How to create a class in JavaScript
In JavaScript classes can be created using functions. Let’s see how.
The method getInfo() gets recreated every time we create a new object. Instead we can add getInfo() to the prototype.
Categories :
OOP
javascript