Answers for "write a program to find factorial of a number using recursion in javascript"

2

factorial recursion javascript

function factorial(n){
  if(n<=1){
    return 1;
  }else{
    var result = 1;
    result = factorial(n-1) * n;
  }
  return result;
}
Posted by: Guest on June-07-2021

Code answers related to "write a program to find factorial of a number using recursion in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language