DEV Community

Discussion on: If/else or just if?

Collapse
 
fluffy profile image
fluffy

The second approach is nice if and only if all of your branches result in a return; however, it's not great if you're trying to do something else with the result of evaluating the conditions.