JSFiddle - React, Tailwind, and code Playground
HTML
<button id=with>With Constructor</button>
<button id=without>Without Constructor</button>
JavaScript
class MyClassWithConstructor {
constructor() {
console.log("Explicit Constructor")
}
}
class MyClassWithoutConstructor {}
$('#with').click(function() {
let tmp = new MyClassWithConstructor();
alert("MyClassWithConstructor name = " + tmp.constructor.name);
})
$('#without').click(function() {
let tmp = new MyClassWithoutConstructor();
alert("MyClassWithConstructor name = " + tmp.constructor.name);
})