Indirect function call in JavaScript

Posted by Art on Stack Overflow See other posts from Stack Overflow or by Art
Published on 2011-03-01T23:05:18Z Indexed on 2011/03/01 23:25 UTC
Read the original article Hit count: 320

Filed under:
|
|

There are things like

f.call(...)
f.apply(...)

But then there's this

(1, alert)('Zomg what is this????!!!11')

"1" does not seem to mean much in this context, the following works just fine:

(null, alert)('Zomg what is this????!!!11')
(1, null, alert)('Zomg what is this????!!!11')
(undefined, alert)('Zomg what is this????!!!11')

Could you point to a specific part of ECMAScript which describes that syntax?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about quirks