Discussion: Arrow Functions vs Traditional Functions
Author: fisker0303Created Apr 25, 2025Updated Mar 31, 2026
Labelsquestion
The style guide recommends using arrow functions for anonymous functions (Section 8.1). While I agree with this recommendation, I think it would be helpful to add more examples showing when traditional functions might still be preferred, such as:
- When you need the function to be hoisted
- When you need to use
thisbinding differently - When you need the
argumentsobject
What do you think about adding these clarifications?
Source: airbnb/javascript