Anonymous Functions

Are they good bad, do you use them, should they be avoided?

Depends on how often you’re going to call a specific function.

  • If using it over and over again on different elements, then they’re bad because you’re going to have duplicated code everywhere.
  • If it’s a one-off or only used in one place, they’re great as it highlights what element it’s attached to.
2 Likes

ok, thank you.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.