标签:cti return console pre func tor factorial class log
// 实现一个5的阶乘
function factorial(n, acc = 1) { console.log(`n=${n};acc=${acc}`) if(n <= 1) return acc return factorial(n - 1, n * acc) } console.log(factorial(5))
标签:cti return console pre func tor factorial class log
原文地址:https://www.cnblogs.com/dwb91/p/8990979.html