classes
-
Classes and subclassesDynamicPL/Javascript 2019. 10. 23. 12:42
1. Overview Class is added in ES6 and doesn't add anything new to the language, but just synthetic sugar over the way we do prototypal inheritance in Javascript. Classes simply make it easier to implement inheritance and to create objects based on blueprints which are called function constructors in ES5. 2. Previous way to inherit methods var Person5 = function(name, yearOfBirth, job) { this.nam..