JSFiddle - React, Tailwind, and code Playground

JavaScript

function Parent() {}
Parent.prototype.foo = function() {
	return "FOO";
}

function Child() {
	Parent.call(this);
}

Child.prototype = Object.create(Parent.prototype);

Child.prototype.foo = function() {
	return super + "BAR";
}

var child = new Child();
console.log(child.foo);