• QuazarOmega@lemy.lol
    link
    fedilink
    arrow-up
    13
    ·
    4 days ago

    On the left you have Elvis Presley, while on the right there’s the so-called Elvis operator

      • dev_null@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 day ago

        Because it’s not one. Ternary operator is A ? B : C, Elvis operator is A ?: B. The same two characters are involved, but both the syntax and effect is different.