JSFiddle - React, Tailwind, and code Playground

by oochs

JavaScript

x = 23;
function plus(a, b) {
    return this.x+a+b; 
}

console.log(plus(1, 1)); // 25
console.log(plus.call({x : "Hello"}, 1, 1)); // Hello11
console.log(plus.apply({x: 42}, [1, 1])); // 44