DEV Community

loading...

Discussion on: 5 ways to refactor if/else statements in JS functions

Collapse
sylwiavargas profile image
Sylwia Vargas Author

yeah, that totally works too! Thanks for this comment!
I always try to balance how much I'm shortening the code vs how long the blog post is as my blogs posts are oftentimes read by folks with not much programming experience. Sometimes, I prefer to introduce changes incrementally or even not to introduce something because I also trust that the readers (just like yourself) would dig more or even find better solutions ✨