We need to add parentheses around the ternary operator, or it will be applied to the whole expression.