什么是递归?就是函数自己调用自己执行。
这个函数内部发生了什么改变呢?我们给分解一下:
arguments 实现的递归:
命名函数的递归:
附加:在JS中()的作用:创建一个块级作用域,独立,闭合的私有空间;在数学代码执行和数学运算中,优先运算执行。