From e51671ec4fe4dbad5062385e90c87700d053a4f8 Mon Sep 17 00:00:00 2001 From: DavidSenn <178643637+DavidStaus@users.noreply.github.com> Date: Fri, 18 Oct 2024 20:40:42 +0200 Subject: [PATCH] Calculator Factorial: Remove redundant guard clause (#499) --- 08_calculator/solution/calculator-solution.js | 1 - 1 file changed, 1 deletion(-) diff --git a/08_calculator/solution/calculator-solution.js b/08_calculator/solution/calculator-solution.js index 4848d86cb77..4d912008317 100644 --- a/08_calculator/solution/calculator-solution.js +++ b/08_calculator/solution/calculator-solution.js @@ -19,7 +19,6 @@ const power = function (a, b) { }; const factorial = function (n) { - if (n === 0) return 1; let product = 1; for (let i = n; i > 0; i--) { product *= i;