この関数を Chromium で実行しようとすると、「Uncaught TypeError: Illegal invocation」というエラー メッセージが表示されます。これはなぜ発生し、どうすれば解決できますか?
getOutput([alert], ["Hi!", "Hello!", "Lolwut?"]); //why doesn't this call "alert"
//for each of the arguments?
//this function is supposed to return the output of each function for each argument.
function getOutput(functions, arguments){
for(var i = 0; i < functions.length; i++){
for(var j = 0; j < arguments.length; j++){
functions[i](arguments[j]); //why doesn't this call the function
}
}
}