<html>

<body>
    <center id="output">
        <button onclick="run()">Run</button>
        <p>Output:</p>
        </br>
    </center>
</body>

</html>
button {
    background: #ff4848;
    color: #c2ffd9;
}
const name = {
  firstName: 'Abhishek'
}
function printName(lastName) {
    print(this.firstName + ' ' + lastName);
}

function run() {
    printName.call(name, 'Call');
    printName.apply(name, ['Apply']);
    const func = printName.bind(name, 'Bind');
    func();
}






















function print(msg) {
    document.getElementById("output").innerHTML += msg + "</br>";
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.