Is constructor mandatory in a JavaScript class?

You should just write a class without a constructor and see if it works 🙂

From the same docs

As stated, if you do not specify a constructor method a default constructor is used. For base classes the default constructor is:

constructor() {}

For derived classes, the default constructor is:

constructor(...args) {
  super(...args);
}

Leave a Comment