|
Answer» Developers have discovered that ES6 classes are really HANDY. The following are some of the most common applications of ES6 classes: - The syntax of ES6 classes is simpler and less prone to ERRORS.
- When it comes to building up inheritance HIERARCHIES, ES6 is the ideal option because it combines new and old syntax, reducing errors and simplifying the process.
- ES6 classes prevent developers from making mistakes when using a new operator. If this proves to be an invalid object for the constructor, classes ELIMINATE this issue by having the constructor throw an exception.
- Classes can also be used to call a method from the prototype's version. With the new ES6 syntax, this version is SIGNIFICANTLY easier to use than previous versions.
|