Using ternary operator as an alternative to if-else in consequent

Ternary operator cannot have sequences or property expressions.