OsrsNeedsF2P@lemmy.ml to Programmer Humor@lemmy.ml · 1 year agoYup, Javascript can go F@#! itselflemmy.mlexternal-linkmessage-square14fedilinkarrow-up16arrow-down12
arrow-up14arrow-down1external-linkYup, Javascript can go F@#! itselflemmy.mlOsrsNeedsF2P@lemmy.ml to Programmer Humor@lemmy.ml · 1 year agomessage-square14fedilink
minus-squareBjörn Tantau@feddit.delinkfedilinkarrow-up0·1 year agoCan someone explain this? I mean, the last result. Usually I can at least understand Javascript’s or PHP’s quirks. But this time I’m stumped.
minus-squaremycus@kbin.sociallinkfedilinkarrow-up0·1 year agoJS null and undefined shenanigans basically: bigger an lesser comparison types convert null to zero, so is zero bigger or lesser than zero? no == is fucky and to it null only equals undefined and undefined only equals null (and themselves), so no is zero bigger than or equal to zero? yeah
minus-squareBjörn Tantau@feddit.delinkfedilinkarrow-up0·1 year agoUgh, thanks, of course. Stupid brain.
minus-squaremycus@kbin.sociallinkfedilinkarrow-up0·1 year agoI’m starting to think JS maintainers have a thing against mathematicians
Can someone explain this? I mean, the last result. Usually I can at least understand Javascript’s or PHP’s quirks. But this time I’m stumped.
JS null and undefined shenanigans
basically:
==
is fucky and to it null only equals undefined and undefined only equals null (and themselves), so noUgh, thanks, of course. Stupid brain.
I’m starting to think JS maintainers have a thing against mathematicians
more likely against humans