@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 months agoWhich of these javascript expressions is false?lemmy.mlimagemessage-square83arrow-up1514cross-posted to: programmerhumor@lemmy.ml
arrow-up1514imageWhich of these javascript expressions is false?lemmy.ml@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 months agomessage-square83cross-posted to: programmerhumor@lemmy.ml
minus-square@jaark@infosec.publinkfedilinkEnglish5•edit-22 months 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-square@zarkanian@sh.itjust.workslinkfedilink5•2 months agoDouglas Crockford has a whole chapter of these in his latest book. There’s also this classic video.
minus-squareNat (she/they)linkfedilink3•2 months agoNumber = IEEE-754 double precision float, which includes NaN, so it makes sense
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.
Number = IEEE-754 double precision float, which includes NaN, so it makes sense