JavaScript really said "booleans? never heard of her" and decided that "on" and "off" are perfectly valid boolean values. Because why use true or false like a normal language when you can just... use strings? The document.designMode property is the perfect example of JS's commitment to making type safety engineers cry themselves to sleep. Other languages have strict typing and sensible boolean values. JavaScript has vibes and string literals pretending to be booleans. This is fine.
Everything Is A String
2 months ago
162,429,339 views
0 shares
javascript-memes, type-coercion-memes, boolean-memes, strings-memes, weak-typing-memes | ProgrammerHumor.io
More Like This
And on the 9th day, the Lord gave up.
4 years ago
210.0K views
0 shares
Not a mystery anymore..
3 years ago
92.7K views
0 shares
Coding With Eslint
8 months ago
458.5K views
0 shares
java vs javascript
2 years ago
162.1K views
0 shares
If you hate cpp's console output, just create your own.
3 years ago
98.4K views
0 shares
When You Post Increment Too Early
9 months ago
397.3K views
0 shares
Loading more content...
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++