Created
March 8, 2011 23:41
-
-
Save tlrobinson/861381 to your computer and use it in GitHub Desktop.
JavaScript stack depth probe, credit to kriskowal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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