JSFiddle - React, Tailwind, and code Playground

by brigand

HTML

<div id="out"></div>

JavaScript

class Foo {
	constructor(x) {
	  this.x = x;
  }
  toString() {
	  return `x: ${this.x}`;
  }
}

const foo = Reflect.construct.bind(null, Foo);

out.textContent = foo().toString()