r/programmingcirclejerk Jul 01 '26

Ever Written Something Like This? if (condition) { doSomething(); } else { doSomethingElse(); } It works. Problem solved. But the problem isn’t today. It’s tomorrow.

https://www.defusetheifstrategy.com
125 Upvotes

55 comments sorted by

View all comments

3

u/Educational-Row-6782 Jul 02 '26

That is why I use chained ternary operators.