Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Factorial of Number in Javascript using Recursive call in javascript

// Factorial of Number in Javascript using Recursive call in javascript
function  factorial(number){
  if(number === 0){
    return 1;
  }
  return number * factorial( number -1);
}
console.log(factorial(4));
 
PREVIOUS NEXT
Tagged: #Factorial #Number #Javascript #Recursive #call #javascript
ADD COMMENT
Topic
Name
7+1 =