4
you are viewing a single comment's thread
view the rest of the comments
[-] mycus@kbin.social 0 points 1 year ago

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
[-] Bjoern_Tantau@feddit.de 0 points 1 year ago

Ugh, thanks, of course. Stupid brain.

[-] mycus@kbin.social 0 points 1 year ago

I'm starting to think JS maintainers have a thing against mathematicians

[-] Quik2007@kbin.social 1 points 1 year ago

more likely against humans

this post was submitted on 16 Jun 2023
4 points (75.0% liked)

Programmer Humor

32060 readers
1276 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS