JSFiddle - React, Tailwind, and code Playground
by Munawwar
JavaScript
function B() { //Base
}
B.prototype = {
message: "bye"
}
function D () { //Derived
}
//The below steps are to achieve classical inheritence (Making D inherit B).
function P() { //Proxy
}
P.prototype = B.prototype;
var newInstance = new P();
D.prototype = newInstance;
var obj4 = new D();
alert(obj4.message);