Writing classes in ES6
July 16, 2017 Leave a comment
ES6 has introduced classes and object inheritance. These are welcome additions since they provide a more convenient way to build object-oriented code than before with functions and prototypes.
Unsurprisingly the keyword to build a class is “class”. Here’s the most simple class with a default empty constructor: