📜  阶乘递归 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:04.003000             🧑  作者: Mango

代码示例3
const factorial = (num) => {
    if (num <= 1) {
        return 1;
    }
    return num * factorial(num-1);
}