JSFiddle - React, Tailwind, and code Playground
JavaScript
function Base() {
}
Base.prototype.hello = function() {
alert("hello");
}
function Sub() {
Base.call(this);
}
Sub.prototype = Object.create(Base.prototype);
var sub = new Sub();
sub.hello();