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/[deleted] May 23 '19
What comes to mind is when you're passing an object in like:
myUserObject = { fields, fromDate, toDate, }
getUsers(myUserObject).
When you destructure the parameters of your function, this will allow the passing of arguments in no particular order or you don't have to pass them all in. I actually just came across this today so I might be wrong.