Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

factorial javascript

// Simple arrow function solution
var factorial = n => (n <= 0) ? 1: n * factorial(n - 1);
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #factorial #javascript
ADD COMMENT
Topic
Name
5+1 =