Calculator Factorial: Remove redundant guard clause (#499)

This commit is contained in:
DavidSenn
2024-10-18 20:40:42 +02:00
committed by GitHub
parent a12f3116fd
commit e51671ec4f
@@ -19,7 +19,6 @@ const power = function (a, b) {
}; };
const factorial = function (n) { const factorial = function (n) {
if (n === 0) return 1;
let product = 1; let product = 1;
for (let i = n; i > 0; i--) { for (let i = n; i > 0; i--) {
product *= i; product *= i;