ES6 Classes part 2
Class Methods in ES6
ES6 introduced a shorthand that does not require the keyword function for a function assigned to a method's name. One type of class method is the prototype method, which is available to objects of the class.
For Example:
In the code above, area is a getter, calcArea is a method.
Comments
Post a Comment