Created
January 3, 2014 17:49
-
-
Save sumardi/8242698 to your computer and use it in GitHub Desktop.
What is obtained when the result of passing 9 into function 4 is then passed into the function whose array index matches the result of passing 3 into function 2?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var puzzlers = [ | |
| function ( a ) { return 8*a - 10; }, | |
| function ( a ) { return (a-3) * (a-3) * (a-3); }, | |
| function ( a ) { return a * a + 4; }, | |
| function ( a ) { return a % 5; } | |
| ]; | |
| alert((puzzlers[(puzzlers[1])(3)])((puzzlers[3])(9))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment