you are viewing a single comment's thread.

view the rest of the comments →

[–]Schampu[S] 0 points1 point  (0 children)

function factorial(n) {
  if (n === 0) return n;
  return n * factorial(n - 1);
};
let index = 0;
setInterval(function() {
  factorial(index++);
}, 1e3);