mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Compare commits
2 Commits
339c4625eb
...
0be2d8a7be
Author | SHA1 | Date | |
---|---|---|---|
|
0be2d8a7be | ||
|
85abf3400d |
@ -3,5 +3,5 @@
|
||||
* @return {number}
|
||||
*/
|
||||
export default function factorialRecursive(number) {
|
||||
return number > 1 ? number * factorialRecursive(number - 1) : 1;
|
||||
return number > 1 ? number * factorialRecursive(number - 1) : -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user