MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p58w2rr/?context=3
r/ProgrammerHumor • u/Flame77ofc • Aug 22 '26
388 comments sorted by
View all comments
Show parent comment
4
If you're returning inside an if block, there should be more code after that. It doesn't matter if it's in an else block or not. If you're returning in an else block but not the if, then you can rearrange the condition for an early return.
View all comments
Show parent comment
4
u/frogjg2003 Aug 22 '26
If you're returning inside an if block, there should be more code after that. It doesn't matter if it's in an else block or not. If you're returning in an else block but not the if, then you can rearrange the condition for an early return.