JSFiddle - React, Tailwind, and code Playground

by Tomek

JavaScript

function parentMeth(arg){
    return arg;
}
function childCall(arg){
    arg+=1;
    return parentMeth.call(this, arg);
}
function childApply(arg){
    arg+=1;
    return parentMeth.apply(this, arguments);
}
document.write(
    "parentMeth(1): " + parentMeth(1) + "<br/>" +
    "childCall(1): " + childCall(1) + "<br/>" +
    "childApply(1): " + childApply(1) 
);