You wouldn’t: it’s messy and hard to read.
You’re looking for the switch
statement in the first case. The second is fine as it is but still could be converted for consistency
Ternary statements are much more suited to boolean values and alternating logic.