loading...

re: #7DaysJS: Factorial and Average VIEW POST

FULL DISCUSSION
 

const fact = (n) => n == 1 || n == 0 ? 1 : n * fact(n - 1);

const avg = (arr = []) => arr.length ? arr.reduce((a, b) => a + b) / arr.length : 0;

Code of Conduct Report abuse