JSFiddle - React, Tailwind, and code Playground
JavaScript
function Parent() {}
Parent.prototype.foo = function() {
return "FOO";
}
function Child() {}
Child.prototype.foo = function() {
return super + "BAR";
}
var child = new Child();
console.log(child.foo);