ran npm run tdd
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
module.exports = factorial = n =>
|
||||
const factorial = n =>
|
||||
n < 0
|
||||
? (() => {
|
||||
throw new TypeError('Negative numbers are not allowed!');
|
||||
})()
|
||||
: n <= 1 ? 1 : n * factorial(n - 1);
|
||||
: n <= 1 ? 1 : n * factorial(n - 1);
|
||||
module.exports = factorial
|
||||
Reference in New Issue
Block a user