mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-14 23:12:58 +08:00
Merge 85abf3400d
into 2c67b48c21
This commit is contained in:
commit
6475244043
@ -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