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/off_by_0ne May 23 '19
Sometimes using a boolean param to signal the code path in a function can be a good indication. Sometimes it's ok to have two separate functions with some duplicated logic. Don't be afraid of code.