Also some things are natively implemented to be created via a class rather than a constructor function - so in the case of HTMLElement one has to use Reflect.construct() to create an instance from (transpiled) ES5.
That said in JavaScript Classes are a template for creating objects - not classes in the sense of class-based object orientation where "class membership" remains static for the lifetime of the object.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
With private members classes are now more than just a sugar
JS classes are not “just syntactic sugar”
Also some things are natively implemented to be created via a
class
rather than a constructor function - so in the case of HTMLElement one has to use Reflect.construct() to create an instance from (transpiled) ES5.That said in JavaScript Classes are a template for creating objects - not classes in the sense of class-based object orientation where "class membership" remains static for the lifetime of the object.