ES5 "strict" and arguments.callee

Possible duplicate:
Why is the arguments.callee.caller property deprecated in JavaScript?

In ES5 strict mode (ie, "use strict" ), the arguments.callee variable, which refers to the current function, is no longer available.

For recursive functions, it is obviously wise to use the function’s own name. However, there are times when I can use the arguments.callee properties (i.e. .length , .prototype ) without having to use the name of the current function.

Can someone explain what obvious problem is (supposedly) to solve by removing it?

+6
source share
1 answer

From here .

arguments.callee makes it very difficult to optimize, such as inline functions, because you must provide a reference to the un-inlined function when accessing arguments.callee.

+5
source

Source: https://habr.com/ru/post/924283/


All Articles