Why does console.log.apply() throw an Illegal Invocation error? [duplicate]

console and log are host objects. Their behavior is implementation dependent, and to a large degree are not required to implement the semantics of ECMAScript.

FWIW, your jsBin fails in Chrome as well unless you change it to…

console.log.apply(console, ['message']);

but that seems to be that log simply anticipates a calling context of console.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)