DEV Community

Discussion on: If/else or just if?

Collapse
 
biros profile image
Boris Jamot ✊ /

I prefer the second approach, but with curly braces.

Generally speaking, I return ASAP like you did to avoid nested code and big if/else statements.