622know the features of your language(lemmy.world)posted 1 year ago byjroid8@lemmy.worldin programmerhumor@lemmy.mlView comments145 commentssavehidereportSort:HotTopControversialNewOldYou are viewing a single thread.View all comments View context [ +- ]π±ππππππππ@lemmy.world6 points1 year agoTypescript/Javascript too permalinksavereportparentreply[ +- ]FooBarrington@lemmy.world17 points1 year ago*Not strictly equivalent, since || tests for truthiness, not just null. permalinksavereportparentreply[ +- ]π±ππππππππ@lemmy.world-1 points1 year agoThatβs fair, but itβs close enough that it functions identically permalinksavereportparentreply[ +- ]FooBarrington@lemmy.world4 points1 year agoOnly for the null case. For other cases it doesnβt function identically, since it also treats "", 0 and undefined the same as null. permalinksavereportparentreply