Caution: ECMAScript 5 (ES5) strictly prohibits the use of arguments.callee(). To avoid this, either name function expressions or opt for a function declaration that calls itself. [MDN]
How can we refer to the o
function within itself in this scenario?
function o(o) { o(); }
o('not a function'); // TypeError: o is not a function
EDIT:
Why not change the parameter/function name?
- I'm currently debugging numerous files containing obfuscated JavaScript code.
- In my view, this issue should be solvable through reflection without requiring refactoring.
EDIT:
In the above case, I am seeking a solution to reference the function within itself, or alternatively, an explanation or valid source indicating why the parameter name overtakes the function name.