• @FooBarrington
      link
      17
      edit-2
      1 year ago

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

        • @FooBarrington
          link
          41 year 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.