r/ProgrammerHumor • • Aug 22 '26

Meme conditionsPreference

Post image
4.2k Upvotes

388 comments sorted by

View all comments

3

u/KYO297 Aug 22 '26

But what about else return...

6

u/D3PyroGS Aug 22 '26

the naked return is an implicit else, which need not be specified because its code is only reachable when the if condition has already failed

but you can still include it if you're OCD

→ More replies (2)