DEV Community

Discussion on: What do you think about the ternary operator?

Collapse
 
gcugreyarea profile image
Barry Robinson • Edited

Most modern compilers are smart enough to optimise control statements. It is more readable than it otherwise would be, but why do it in the first place?