Last updated 3 years ago
Was this helpful?
JS Solution
function factorial(n) { return n ? n * factorial(n - 1) : 1; }