function main(num,total=1) {
if(num===1) return total;
return main(num-1,num*total)
}
main(5)
function main(num,total=1) {
if(num===1) return total;
return main(num-1,num*total)
}
main(5)
转载于:https://www.cnblogs.com/holy-amy/p/9450145.html