mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-14 06:52:59 +08:00
Compare commits
2 Commits
339c4625eb
...
0be2d8a7be
Author | SHA1 | Date | |
---|---|---|---|
|
0be2d8a7be | ||
|
85abf3400d |
@ -3,5 +3,5 @@
|
|||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
export default function factorialRecursive(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