Skip to content

Instantly share code, notes, and snippets.

@sumardi
Created January 3, 2014 17:49
Show Gist options
  • Save sumardi/8242698 to your computer and use it in GitHub Desktop.
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?
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