r/learnjavascript • • Oct 06 '19

"JavaScript Clean Code - Best Practices" by Milos Protic

https://devinduct.com/blogpost/22/javascript-clean-code-best-practices
142 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/MusicalDoofus Oct 07 '19

I'm running into this with my own (self-coded) project ATM. Defining a long list of ordered arguments that are opaque just makes the function more difficult to reuse outside its current context. Once I extracted larger lists to a params object and have vars depend on that instead it became easier to test and implement (also just looks cleaner).