JSFiddle - React, Tailwind, and code Playground
by kman007_us
JavaScript
var callback;
var obj = {voicemail: []};
callback = (function (__this) {
console.log("__this:", __this);
var __func = function(message) {
console.log("message:", message);
return this.voicemail.push(message);
};
return function() {
console.log("__this:", __this, "arguments:", arguments);
return __func.apply(__this, arguments);
};
})(obj);
callback("hey call me back");
console.log("obj.voicemail:", obj.voicemail);