JSFiddle - React, Tailwind, and code Playground
by vcsjones
JavaScript
Function.prototype.superdo = function() {
var func = this;
var args = arguments;
return function() {
func.apply(func, args);
};
};
var happyFunction = function(str) {
alert(str);
};
var wrapper = happyFunction.superdo('args');
wrapper();