//关于递归的方式 一般用于找父类的某个值
<script> // 5! = 5 * 4 *3 * 2 * 1 = 120 // 0! = 1 function jiecheng(n) { if (n == 0) return 1; return n * jiecheng(n - 1); } console.log(jiecheng(5)); </script>