DEV Community

Discussion on: Clean JavaScript - 10 Tips

Collapse
lukaszahradnik profile image
Lukáš Zahradník

Replacing conditions with array methods is a bad idea in general.

With your way, you lose short-circuit evaluation. Also it's not really more readable as it's almost the same.