Skip to content

Commit e51671e

Browse files
authoredOct 18, 2024
Calculator Factorial: Remove redundant guard clause (#499)
1 parent a12f311 commit e51671e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed
 

‎08_calculator/solution/calculator-solution.js

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const power = function (a, b) {
1919
};
2020

2121
const factorial = function (n) {
22-
if (n === 0) return 1;
2322
let product = 1;
2423
for (let i = n; i > 0; i--) {
2524
product *= i;

0 commit comments

Comments
 (0)
Failed to load comments.