JSFiddle - React, Tailwind, and code Playground

JavaScript

function extend(child, parent) {
    child.prototype = new parent();
    child._super = parent;
    return child;
};

function ParentClass() {
	this.a = 1
}

var ChildClass = extend(function() {}, ParentClass);

document.body.innerHTML = new ChildClass().a