DEV Community

Discussion on: Avoid using ELSE, write a better code

Collapse
 
jamesrgrinter profile image
James R Grinter

I’m a big fan of that early return, allowing any future reader of your code to see quickly under what conditions it doesn’t need to do further work, and what the real work is.

Collapse
 
darlantc profile image
Darlan Tódero ten Caten

Indeed, I think it is very easy to understand a function like that.