Hacker News new | ask | show | jobs
by ricardobeat 2552 days ago
You need to do the same in-head simulation for the standard if, it just feels effortless due to familiarity. Note the author messed up by not using the same logic in the ternary.

    conditionA
      ? conditionB
        ? ‘A + B’
        : ‘A’
      : ‘Not A’;