Find limit of recursion: Difference between revisions

No edit summary
Line 449:
Sample output:
<pre>Recursion depth on this system is 10473.</pre>
 
 
=={{header|Javascript}}==
<lang javascript>
function recurse(depth) {
try {
return recurse(depth+1);
} catch(ex) {
return depth;
}
}
 
maxRecursion = recurse(1);
document.write( "Recursion depth on this system is " + maxRecursion);
</lang>
 
Sample output (Chrome):
<pre>Recursion depth on this system is 10473.</pre>
 
Sample output (Firefox 1.6.13):
<pre>Recursion depth on this system is 3000.</pre>
 
Sample output (IE6):
<pre>Recursion depth on this system is 2552.</pre>
 
=={{header|Logo}}==
Anonymous user