DEV Community

Discussion on: Nested Ternary statements in React JSX

Collapse
georgecoldham profile image
George

I just use indentation.

const drink = dislikeCoke
    ? 'fanta'
    : likesCherry
        ? 'cherryCoke'
        : 'dietCoke';