I would like to execute all functions in an array in global scope. I want to use a shorthand so I decided to use Function.prototype.call
and call
Function.prototype
's call
method on all functions. I don't care about the arguments forEach
sends to the functions.
[function(){}, function(){}].forEach(Function.prototype.call.call)
Why this is not working and throwing following error?
TypeError: undefined is not a function