class Base {
constructor(o) {
// This object will become the this value of any subclass
return o;
}
}
class Derived extends Base {
#x = 0;
}TypeError: Initializing an object twice is an error with private fields/methods
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.