you are viewing a single comment's thread
view the rest of the comments
[–] 0 points 3 years ago (1 child)

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.

  • source
  • hideshow 2 child comments
  • [–] 0 points 3 years ago (1 child)

    JS null and undefined shenanigans


    basically:

    1. bigger an lesser comparison types convert null to zero, so is zero bigger or lesser than zero? no
    2. == is fucky and to it null only equals undefined and undefined only equals null (and themselves), so no
    3. is zero bigger than or equal to zero? yeah
  • source
  • parent
  • hideshow 2 child comments