Answers for "how to call same function inside this function"

0

how to call same function inside this function

let math = {
  'factit': function factorial(n) {
    console.log(n)
    if (n <= 1) {
      return 1;
    }
    return n * factorial(n - 1);
  }
};

math.factit(3) //3;2;1;
Posted by: Guest on April-20-2021

Code answers related to "how to call same function inside this function"

Code answers related to "Javascript"

Browse Popular Code Answers by Language