var shell = function (method) {
window[method].apply(null, Array.prototype.slice.call(arguments, 1));
};
shell('alert', 'monkey!');
alert.apply is the problem. Alert is not part of the language, so it may not be even a function. It is implementation-dependent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With