0 vs null vs undefined - explained with toilet paper

jeff 👨‍💻@programming.dev to Programmer Humor@programming.dev – 381 points –
36

You are viewing a single comment

Image Transcription: Meme


[Four images of toilet roll holders, each with text above them.

The first shows a toilet roll holder holding a partially-used roll of toilet paper. Its text reads, "Non-zero value".

The second shows a holder holding a completely used roll of toilet paper, leaving just the cardboard tube. Its text reads, "0".

The third shows a holder with no toilet roll or cardboard tube on it at all. Its text reads, "null".

The fourth shows no holder; simply plain wall. Its text reads, "undefined".]


I am a human who transcribes posts to improve accessibility on Lemmy. Transcriptions help people who use screen readers or other assistive technology to use the site. For more information, see here.