1117
you are viewing a single comment's thread
view the rest of the comments
[-] Gork@lemm.ee 53 points 1 year ago
[-] Omega_Haxors@lemmy.ml 9 points 1 year ago

Bobby Tables would be proud.

[-] gornius@lemmy.world 5 points 1 year ago* (last edited 1 year ago)

The way I use it is 'undefined' is literally undefined (not set), but null means no value - explicitly.

[-] FiniteLooper@lemm.ee 5 points 1 year ago

I used to ban null usages with ESLint rules for this exact reason. If it’s there use a value, if not use undefined

[-] chaorace@lemmy.sdf.org 1 points 1 year ago

Except you can define a value with undefined and accessing that value will have different behavior than attempting to access an undefined value.

[-] MonkderZweite@feddit.ch 2 points 1 year ago

It's a non-zero string tho?

this post was submitted on 05 Oct 2023
1117 points (97.0% liked)

Programmer Humor

32155 readers
212 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS