Fun impossible Firefox JS challenge

gaz Heyes gazheyes at
Thu Apr 12 05:58:06 PDT 2012

Hey all

Just thought I'd post a bit of fun related to the Firefox JS parser.


function true(){alert('Call me');};



The trick is to execute the function "true" from within the function

1. Your code must be within the function expression as indicated by the
2. You cannot redefine "true" anywhere else including window etc.
3. You must call the actual function as defined in the original code.

This is just for fun and should be impossible but it does highlight a
couple of things, 1) JavaScript has no way to reference inner functions
that are not a property of the object without directly calling their name.
2) Mozilla JS devs are crazy (in a nice way)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list