DEV Community

Discussion on: Why we shouldn't use "else"

Collapse
realtebo profile image
Mirko Tebaldi

I also prefer to fail fast. So i do this checks in a function and return at first failed checked. So no else.

Anyway, else is not evil and can be very clear to force programmer mind to understand that two condition are not mutually exclusive. It helps months ago I wrote something