JSFiddle - React, Tailwind, and code Playground

by Gert Vaartjes

JavaScript

function t(n) {
  if (n === 0) {
    return 1
  } else {
    console.log(`${t(n-1)}`);
    return n * t(n - 1)
  }
}

console.log(t(5))

5 * ((4* (3) * 2 * 1) )