Fork me on GitHub
function factorial(n) { if (n === 0) return n; return n * factorial(n - 1); }; let ii = 0; setInterval(function() { factorial(ii++); }, 1e3);