ES-6 classes
Code for this and several other ES-6 features can be found in my github ES-6 has introduced a “class” keyword and “extends” keyword which are similar looking to classes in Java. In reality these are nothing but a syntactic sugar over prototypical inheritance in ES-5. In ES-5 classes were depicted as follows: var PersonEs5 = function(firstName, lastName){ this.firstName = firstName; this.lastName =lastName; } var p1 = new PersonEs5('first','last'); With ES-6 the same class can be written as follows: class Person{ constructor(firstName,lastName){ this.firstName = firstName; this.lastName = lastName; } } Classes are nothing but functions under the cover. If the ES-6 code is compiled down to ES-5, the compiled version will be as follows: function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Pers...