8000 feat(08): remove recursive solution (#457) · mstottrop/javascript-exercises@930673d · GitHub
[go: up one dir, main page]

Skip to content

Commit 930673d

Browse files
authored
feat(08): remove recursive solution (TheOdinProject#457)
Not appropriate to expose learners to at this point in the curriculum
1 parent 1afbcf8 commit 930673d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

08_calculator/solution/calculator-solution.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ const factorial = function (n) {
2727
return product;
2828
};
2929

30-
// This is another implementation of Factorial that uses recursion
31-
// THANKS to @ThirtyThreeB!
32-
const recursiveFactorial = function (n) {
33-
if (n === 0) {
34-
return 1;
35-
}
36-
return n * recursiveFactorial(n - 1);
37-
};
38-
3930
module.exports = {
4031
add,
4132
subtract,

0 commit comments

Comments
 (0)
0