factorial using javascript stack overflow 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);