Created
December 27, 2016 12:39
-
-
Save sirodoht/c82914bb7ebd97da7145a8c5fea34242 to your computer and use it in GitHub Desktop.
Compute call stack limit
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 computeMaxCallStackSize() { | |
try { | |
return 1 + computeMaxCallStackSize(); | |
} catch (e) { | |
// Call stack overflow | |
return 1; | |
} | |
} | |
computeMaxCallStackSize(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment