Skip to content

Commit

Permalink
Calculator Factorial: Remove redundant guard clause (TheOdinProject#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidStaus authored Oct 18, 2024
1 parent a12f311 commit e51671e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion 08_calculator/solution/calculator-solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e51671e

Please sign in to comment.