javascript factorial value of negative number code example
Example: factorial javascript
// Simple arrow function solution
var factorial = n => (n <= 0) ? 1: n * factorial(n - 1);
// Simple arrow function solution
var factorial = n => (n <= 0) ? 1: n * factorial(n - 1);