提交 1c0b5ced 编写于 作者: AresnLiang's avatar AresnLiang

生产代码片段

上级 ca207a2f
console.log("欢迎来到 InsCode");
\ No newline at end of file
function factorial(n) {
if (n === 0) {
return 1;
} else {
return n * factorial(n - 1);
}
}
console.log(factorial(5)); // 输出 120
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册