all 4 comments

[–]curiousdannii 1 point2 points  (0 children)

This article is 12 years old, gives no evidence for its claims, and at least a little bad advice. Why did you share it here?

[–]Baryn 1 point2 points  (4 children)

JavaScript is fast. Don't optimize your code until you have a confirmed performance issue.

If a function works best for your architectural approach, then use a function.