function factorial(num){ if(num<=1){ return 1 }else{ return num *factorial(num - 1) } } let num1 = factorial(5) console.log(num1) function factorial(num){ if(num<=1){ return 1 }else{ return num *arguments.callee(num - 1) } } let num2 = factorial(5) console.log(num2) // caller 这个属性引用的是调用当前函数的函数 function outer(){ inner() } function inner(){ console.log(inner.caller) } outer()