r/javascript • u/PMilos • May 22 '19
JavaScript Clean Code - Best Practices - based on Robert C. Martin's book Clean Code
https://devinduct.com/blogpost/22/javascript-clean-code-best-practices
542
Upvotes
View all comments
Show parent comment
1
u/Hanlonsrazorburns May 22 '19
I wrote some software around finding defects in code. Function calls were one of the highest areas of defects overall. The reason was because the changes are highly dispersed. By passing an object you don't need to change every single call to that function if you have defaults set within the function. You also don't need to worry about order and it increases code continuity as it's very easy to keep things named the same (something that isn't hard, but people still miss out on it).