Yup, Javascript can go F@#! itself

https://lemmy.ml/post/1295968

Yup, Javascript can go F@#! itself - Lemmy

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:

  • 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
  • Comparisons

    Ugh, thanks, of course. Stupid brain.
    I'm starting to think JS maintainers have a thing against mathematicians
    more likely against humans