DEV Community

loading...

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

Collapse
alainvanhout profile image
Alain Van Hout

I'd tend to just method extract this, and use explicit return statements inside plain if-statements.

At least in part, that's because the conditions will rarely be as brief (when they are thus numerous).