DEV Community

loading...

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

Collapse
sylwiavargas profile image
Sylwia Vargas Author

I love these examples — thank you!

condition in if statement could be very long so that return would be lost dangling somewhere outside of field of view
I really couldn't agree more. This is definitely one of the main things that bother me about JS specifically — that there's no strict standard/expectation of writing really short code.