loading...

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

Collapse
mhlut profile image
Marijke Luttekes

A single ternary is fine, as long as you don't write down a long line of complicated logic. It's especially joy when providing default values for variables that may or may not have a value.

Screw multi-ternaries though. Even when aligned properly I hate reading those and figuring out what they do exactly.