Skip to content

Discussion: Arrow Functions vs Traditional Functions #3121

Open
@fisker0303

Description

@fisker0303

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:

  1. When you need the function to be hoisted
  2. When you need to use this binding differently
  3. When you need the arguments object

What do you think about adding these clarifications?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions