this post was submitted on 17 May 2025
444 points (98.5% liked)
Programmer Humor
23312 readers
1154 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'd say C too because that's the only one that would be True in a normal programming language and this is javascript so...
probably not true in most other langauges. although I'm not well versed in the way numbers are represented in code and what makes a number "NaN", something tells me the technical implications of that would be quite bad in a production environment.
the definitive way to check for NaN in JS would probably be something like
It's not true in a normal programming language. If it is true in yours, you should stop using it immediately.
A non type should be a type. It should be of the type none. And it is in good script languages like Python so I don't know why you think it shouldn't.