cm0002@lemmy.world to Programmer Humor@programming.dev · 11 days agoWhich of these javascript expressions is false?lemmy.mlexternal-linkmessage-square77linkfedilinkarrow-up1502arrow-down111
arrow-up1491arrow-down1external-linkWhich of these javascript expressions is false?lemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 11 days agomessage-square77linkfedilink
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up14·11 days agotypeof null === "object" was actually a bug in the early implementations, and they decided to keep it in the spec: https://2ality.com/2013/10/typeof-null.html (see the comment from Brendan Eich)
minus-squaregnutrino@programming.devlinkfedilinkEnglisharrow-up18·edit-210 days agoTony Hoare: “Introducing NULL was a billion-dollar mistake” Brendan Eich: “Hold my undefined”
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up21·10 days agoWe had one null, yes. But what about second null?
typeof null === "object"
was actually a bug in the early implementations, and they decided to keep it in the spec: https://2ality.com/2013/10/typeof-null.html(see the comment from Brendan Eich)
Tony Hoare: “Introducing NULL was a billion-dollar mistake”
Brendan Eich: “Hold my undefined”
We had one
null
, yes. But what about secondnull
?