Day 1: Functions

Problem Link

Solution

Func.js
function factorial(n) {
  return n ? n * factorial(n - 1) : 1;
}

Last updated

Was this helpful?