concept class definition in category javascript

appears as: class definition, class definitions
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

This is an excerpt from Manning's book Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond.

Adding a method here is the exact same syntax as the shorthand method names on objects that you learned about in lesson 12. Don’t let this fool you, though: a class definition is not an object and other syntaxes won’t work. The attempt to create a method in the next listing will result in a syntax error.

27.5. Setting instance properties in class definitions

There’s another aspect of classes that, at the time of this writing, is just a proposal but is gaining lots of use, and that’s setting instance properties in class definitions. Setting properties in classes (unlike methods) may seem simple at first, but actually has more to it than might initially meet the eye. This is because the methods are added to the prototype, but the properties are assigned to each instance.