A Matter of Class

Introduced by the ECMAScript 2015 specifications, the class construct has become part of the official JavaScript syntax. This construct has been enthusiastically welcomed by many developers. Indeed, it has been considered a sign of the formalization of various attempts to simulate classes, inheritance, and other object-oriented features offered for several years by many libraries, such as Prototype, ExtJS, Dojo, Backbone, Ember, and others. TypeScript itself was born with the aim of bringing class-based object-oriented programming to the JavaScript language. However, the class construct may lead to serious misconceptions about the object-oriented nature of JavaScript. Let’s analyze why.
A Convenient Construct
Using the class construct is very handy. Just take a look at the following code to define the Animal class:

Link: https://dzone.com/articles/a-matter-of-class?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev