re: If/else or just if? VIEW POST

FULL DISCUSSION
 

The second one. Every time. For the early returns reason mentioned earlier. Since you're doing a return, the else is an anti-pattern.

Also this thread terrifies me for all the code that exists out there and solidifies everything about xkcd.com/2030/

code of conduct - report abuse