JSFiddle - React, Tailwind, and code Playground
JavaScript
function parent() {
// ...
}
function child() {
// ...
}
child.prototype = new parent();
var childobj = new child();
if (parent.prototype.isPrototypeOf(childobj)) {
alert('true');
}
function parent() {
// ...
}
function child() {
// ...
}
child.prototype = new parent();
var childobj = new child();
if (parent.prototype.isPrototypeOf(childobj)) {
alert('true');
}