Skip to content

Instantly share code, notes, and snippets.

@tlrobinson
Created March 8, 2011 23:41
Show Gist options
  • Save tlrobinson/861381 to your computer and use it in GitHub Desktop.
Save tlrobinson/861381 to your computer and use it in GitHub Desktop.
JavaScript stack depth probe, credit to kriskowal
function probe() {
var count = 1;
function recurse() {
count++;
recurse();
}
try {
recurse();
} catch (e) {
}
return count;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment