re: ES6 classes VIEW POST


Well written, I like it!

One minor suggestions for improvement: You write "An instance of a class is created using the new keyword. Since a class is basically an object, we call its methods same way we will do to the methods of an object.". Don't you mean instance? And I think in the code example you missed parentheses for the function calls Sarah.sayName().

I think its important to realize that its really just new syntax for the old prototype chain pattern. I tried to highlight this and a few other differences from classical OOP classes in languages like Java in an earlier post:

code of conduct - report abuse