maybe u can use, its an alternative.
copy/paste from web.
Quote: "If your code uses tail recursion (that is, the function returns the result of every recursive call directly without any other processing) then it's possible to rewrite the function imperatively without a stack:
function dosomething(a,b,c,d)
{
// manipulate a,b,c,d
if (condition)
return dosomething(a,b,c,d)
else
return something;
}
Into:
function dosomething(a,b,c,d)
{
while (true)
{
// manipulate a,b,c,d
if (condition) continue;
else return something;
}
}
"
AGK (Steam) V2.0.18 : Windows 10 Pro 64 Bit : AMD (15.30.1025) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)