this post was submitted on 05 Aug 2025
122 points (98.4% liked)

Programmer Humor

37634 readers
483 users here now

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

Rules:

founded 6 years ago
MODERATORS
 

That's it. That's the meme.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Telemachus93@slrpnk.net 3 points 2 days ago (1 children)

In other languages that shouldn't be equal either though, right?

Maybe you meant

if (2){
console.log("nonzero ints are truthy")
}
else {
console.log("no they're not")
}

Which would output

nonzero ints are truthy

and that would actually work in all languages I know. But that's different from being equal.

[โ€“] retrolasered@feddit.uk 2 points 2 days ago

Yeah its checking for not null with if isnt it. Maybe thats what has me confused