javascript 中 arguments.callee属性

时间:2021-12-11 20:07:21

javascript 中 arguments.callee属性 可以在函数内部,指向的是这个函数(或者叫做“类”)本身。

相当于PHP 中的 self 关键字。

The arguments.callee property contains the currently executing function.

Description

callee is a property of the arguments object. It can be used to refer to the currently executing function inside the function body of that function. This is useful when the name of the function is unknown, such as within a function expression with no name (also called "anonymous functions").

javascript 中 arguments.callee属性