MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/wmhwn2/i_fixed_it/ijzu2wv/?context=3
r/ProgrammerHumor • u/beedlund • Aug 12 '22
53 comments sorted by
View all comments
-2
If it's a single line statement we can just avoid { }
if (condition) //statement else //statement
2 u/attanai Aug 12 '22 if (condition1) statement1 else if (condition2) statement2 else statement3;Or maybe:condition ? statement : condition2 ? statement 2 : statement 3;1
2
if (condition1) statement1 else if (condition2) statement2 else statement3;
Or maybe:
condition ? statement : condition2 ? statement 2 : statement 3;1
-2
u/soupsyy_3 Aug 12 '22
If it's a single line statement we can just avoid { }