Menu
Java was almost called Oak. Glad they changed it.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Backend
Bash
C++
Cloud
Csharp
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
12 months ago
375.2K 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
368.3K 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
SAMSUNG T7 Portable SSD, 4TB External Solid State Drive, Speeds Up to 1,050MB/s, USB 3.2 Gen 2, Reliable Storage for Gaming, Students, Professionals, MU-PC4T0T/AM, Gray
Affiliate
$906.82
You guys misbehaved, so I removed the snakes until you can think about your choices
Programming
64.5K views
3 years ago
In This World Nothing Can Be Said To Be Certain, Except Death, Taxes, And Pre-Builts Getting Worse
Hardware
271.1K views
8 months ago