3 ms·
Especially if you format them well. Just use a newline before each `:` and maybe after each `?` (if the value expressions are large), and it'll look great. r
by dlbucci 5y ago
Especially if you format them well. Just use a newline before each `:` and maybe after each `?` (if the value expressions are large), and it'll look great.
return isA ? A
: isB ? B
: isC ? C
: D
- bluefirebrand 5y agoThis looks fine as an example right here, but it starts to look terrible if there's larger or multiline boolean expressions involved, while if/else if winds up still being pretty readable.