You're viewing a single thread.
All Comments
27 comments
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.
1 0 ReplyJS null and undefined shenanigans
basically:
- bigger an lesser comparison types convert null to zero, so is zero bigger than zero? no
==
is fucky and to it null only equals undefined and undefined only equals null, so no- is zero bigger than or equal to zero? yeah
4 0 ReplyUgh, thanks, of course. Stupid brain.
0 0 ReplyI'm starting to think JS maintainers have a thing against mathematicians
1 0 Replymore likely against humans
1 0 Reply
My only thought here might be >= is usually the same as !< and maybe thats how it is defined in javascript and since < is false than >= == !false == true
2 0 Reply
27 comments
Scroll to top