617
submitted 9 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 13 points 9 months ago

Even in Javascript, the ?? operator checks explicitly for null or undefined. So it added undefined, but not 0 or false. But adding undefined sounds like a good addition for this operator.

See the Javascript section of: https://wikipedia.org/wiki/Null_coalescing_operator#Examples_by_languages

this post was submitted on 08 Dec 2023
617 points (96.4% liked)

Programmer Humor

32060 readers
776 users here now

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

Rules:

founded 5 years ago
MODERATORS