Here,I looking to how to counter this "Maximum call stack size exceeded" error,I try to solve this error but I couldn't. In this code I am trying to count numbers in descending order using recursion. Here is my html code:
<html>
<head>
<script src="printInfinity.js" type="text/javascript" asynce></script>
</head>
<body>
</body>
</html>
Here is my JS code:
var i=100000;
function print()
{
i-=1;
console.log(i);
if(i!=0)
{
print();
}
}
print();