Jump to content

Find limit of recursion: Difference between revisions

Line 449:
=={{header|JavaScript}}==
<lang javascript>
function recurse(depth) {
{
try {
return recurse(depth+1);
{
} catch(ex) {
return recurse(depth + 1);
}
} catch(ex) {
{
return recurse(depth+1);
}
}
 
var maxRecursion = recurse(1);
document.write( "Recursion depth on this system is " + maxRecursion);</lang>
</lang>
 
Sample output (Chrome):
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.