Hacker News new | ask | show | jobs
by Touche 3799 days ago
You can add object properties to a ES6 class's prototype, no?

EDIT: Just tested in Firefox and indeed you can.

1 comments

Not in the class declaration, though. Why force the programmer to go through the prototype, when ES6 provides such a "convenient" abstraction around it?
Coming to the spec soonish and already supported in Babel - https://github.com/jeffmo/es-class-fields-and-static-propert...