Limited support Do not use in modern code. Named functions and explicit references are clearer and safer.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
callee
Deprecated
1
12
1
1
18
1
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Live demo

Recursive call with arguments.callee

Use the legacy recursive pattern inside a non-strict function expression.

JavaScript
Output
Press the Run button

Anonymous function recursion

Show how arguments.callee was used before naming the function directly.

JavaScript
Output
Press the Run button

Compare with a named function

Contrast the legacy pattern with the modern named-function approach.

JavaScript
Output
Press the Run button

Use cases

  • Legacy recursion fixes

    Replace anonymous self-reference patterns in older code with named functions or local bindings.

  • Strict-mode cleanup

    Use migration work to remove callee references before modernizing a codebase.

Cautions

  • arguments.callee is deprecated and unavailable in strict mode.
  • Self-reference should be explicit so stack traces and code reviews stay understandable.

Accessibility

  • No direct accessibility behavior, but reducing legacy language features lowers maintenance risk in interactive code.
  • Prefer patterns that are easier for teams to debug and stabilize.