← Back to Question List
JavaScript Code Walkthrough #22
Factorial by Recursion
📄 Code
Read carefully — what does this print?1function fact(n) {2 if (n <= 1) return 1;3 return n * fact(n - 1);4}5console.log(fact(4));