You know, ternary (conditional) operators!
const a = condition? if_true : if_false;
Ternary operators are probably the most underrated. Being a declarative programming enjoyer, I think people don’t use ternary operators enough even when appropriate. Admittedly,
- they’re more …