a1exlism
10/17/2017 - 4:58 AM

Arguments-callee&caller

about functions callee function caller self

https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/arguments/callee

[1,2,3,4,5].map(function (n) {
    return !(n > 1) ? 1 : arguments.callee(n - 1) * n;
});

callee 直接调用正在使用的函数名, 主要用于匿名函数(因为就是没名字= =)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/caller Obsolete, which means deprecated.