• @FooBarrington
    link
    17
    edit-2
    10 months ago

    Not strictly equivalent, since || tests for truthiness, not just null.

      • @FooBarrington
        link
        410 months ago

        Only for the null case. For other cases it doesn’t function identically, since it also treats "", 0 and undefined the same as null.