• dot20@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    1 year ago

    Ah, I understand now. The expression is evaluated like this:

    • $a == 1 ? "one" : $a == 2 ? "two" : $a == 3 ? "three" : "other"
    • $a == 2 ? "two" : $a == 3 ? "three" : "other"
    • "two" ? "three" : "other"
    • "three"