Created
April 13, 2020 03:46
-
-
Save SanthoshBabuMR/14dcf4793235d6d6d35885d554b2d90e to your computer and use it in GitHub Desktop.
maximum call stack size
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
// Ref: https://2ality.com/2014/04/call-stack-size.html | |
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