loading...

re: What do you think about the ternary operator? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Proper formatting goes a long way at improving readability: variable = condition1 ? expression1 : condition2 ? expression2 : condit...
 

I'd tend to just method extract this, and use explicit return statements inside plain if-statements.

At least in part, that's because the conditions will rarely be as brief (when they are thus numerous).

code of conduct - report abuse