Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Lythenas2427yI usually prefer the first unless it's something really short for a return. Like: return x > 0 ? 1 : -1;
-
ac123511437yTermary usually expects expressions and not statements, hence no, I don't worry about the guy, who doesn't even get his syntax right.
Related Rants
YOU: if(exp){ statement 1;} else { statement 2;}
v/s
THE GUY: exp ? Statement1 : statement 2;
She says not to worry about!!
rant
primitive
ternary
ifelse