JSFiddle - React, Tailwind, and code Playground

by spechackers

JavaScript

var obj = {
    x: 1,
    func: function(a){
        return this + a;
    }
}
var obj2 = {x : 2}

console.log(obj.func.apply(1, [2]));