Skip to content

Instantly share code, notes, and snippets.

@strich
Created September 3, 2014 07:09
Show Gist options
  • Save strich/e7b0dd38312b13538e47 to your computer and use it in GitHub Desktop.
Save strich/e7b0dd38312b13538e47 to your computer and use it in GitHub Desktop.
var someArray[];
int arrayPos = 0;
CallFunction(funcArray, arrayPos, null);
CallFunction(var funcArray[], int arrayPos, var result) {
var newResult = window[funcArray[arrayPos]];
if(result == null)
newResult();
else
result();
arrayPos++;
CallFunction(funcArray, arrayPos, newResult);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment