Skip to content

Instantly share code, notes, and snippets.

@codylindley
Created March 14, 2012 04:02
Show Gist options
  • Select an option

  • Save codylindley/2033972 to your computer and use it in GitHub Desktop.

Select an option

Save codylindley/2033972 to your computer and use it in GitHub Desktop.
Find limit of recursion
var recurse = function(depth){
try{
return recurse(depth + 1);
}catch(ex){
return depth;
}
};
console.log(recurse(1));
@codylindley
Copy link
Copy Markdown
Author

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment