Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

factorial javascript

// Simple arrow function solution
var factorial = n => (n <= 0) ? 1: n * factorial(n - 1);
 
PREVIOUS NEXT
Tagged: #factorial #javascript
ADD COMMENT
Topic
Name
9+2 =