Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Recursive/FactorialCalculator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const factorialRecursion = (n) => n === 0 ? 1 : n * factorialRecursion(n - 1)
Comment thread
Croustys marked this conversation as resolved.

// num can be anything you'd like
const num = 3
console.log(factorialRecursion(num))
Comment thread
Croustys marked this conversation as resolved.