DEV Community

Discussion on: Why switch is better than if-else

Collapse
 
vlasales profile image
Vlastimil Pospichal

I got rid of all "else" in my programs. They are shorter, faster and clearer now. I used a switch, ternary, or return by context.