cm0002@lemmy.world to Programmer Humor@programming.dev · 1 month agoWhich of these javascript expressions is false?lemmy.mlimagemessage-square68fedilinkarrow-up1441arrow-down110
arrow-up1431arrow-down1imageWhich of these javascript expressions is false?lemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 1 month agomessage-square68fedilink
minus-squarejaark@infosec.publinkfedilinkEnglisharrow-up5·edit-21 month agoI don’t think my sanity can take all of these explanations. Though I just spotted one that’s worse than null being an object … typeof NaN "number" I mean, come on… it’s even in the fucking name! Edit - fixed capitalisation in ‘NaN’
minus-squarezarkanian@sh.itjust.workslinkfedilinkarrow-up4·1 month agoDouglas Crockford has a whole chapter of these in his latest book. There’s also this classic video.
I don’t think my sanity can take all of these explanations.
Though I just spotted one that’s worse than null being an object …
typeof NaN "number"
I mean, come on… it’s even in the fucking name!
Edit - fixed capitalisation in ‘NaN’
Douglas Crockford has a whole chapter of these in his latest book. There’s also this classic video.