Skip to content

Instantly share code, notes, and snippets.

@igstan
Created April 27, 2012 19:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igstan/2512001 to your computer and use it in GitHub Desktop.
Save igstan/2512001 to your computer and use it in GitHub Desktop.
Anonymous recursion in JavaScript
(function privateName(i) {
if (i === 0)
return;
console.log(i);
privateName(i - 1);
})(5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment