Menu
Java was almost called Oak. Glad they changed it.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Azure
Backend
Bash
C++
Cloud
All Categories
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
Falsy values Memes
Posts tagged with Falsy values
The Toilet Paper Theory Of JavaScript Values
Javascript
Debugging
Programming
Frontend
Typescript
1 year ago
461.3K views
0 shares
The ULTIMATE toilet paper analogy for JavaScript's most DRAMATIC value types! 💀 Non-zero values? FULL ROLL. Plenty to work with! But then we descend into the TRAGIC TRILOGY: Zero? Just a sad little empty cardboard tube. Still EXISTS but utterly USELESS for its intended purpose! Null? Just a BARREN rod. Someone DELIBERATELY removed everything. The AUDACITY! Undefined? The ABSOLUTE BETRAYAL - not even a HINT of toilet paper ever being there! Just like when you try to access that property you SWORE you defined!
Java Script Be Like...
Javascript
Frontend
Webdev
Programming
Typescript
1 year ago
433.1K views
0 shares
Ah, JavaScript's type coercion explained with toilet paper. Pure genius. Non-zero value: Has toilet paper. Works as expected. 0: Empty roll but still there. Technically exists but utterly useless. null: Just the holder. Someone deliberately removed the toilet paper. undefined: No toilet paper holder at all. Whoever built this bathroom forgot a critical component. And yet somehow all of these evaluate to false in an if statement. JavaScript, where the rules are made up and the types don't matter.
Today's picks
Windows User And Linux User
Linux
121.2M views
19 days ago
System.out.println("Hello World")
Programming
87.8K views
4 years ago
Helicopter Helicopter
Backend
45.3K views
2 years ago