const factorialize = num => { if (num === 0 || num === 1) { return 1; } for (let i = num - 1; i >= 1; i--) { num *= i; } return num; };
math.factorial(5)
function factorial(n) { return (n + 1) * (n / 2); }