this post was submitted on 25 Sep 2025
1092 points (99.2% liked)

Programmer Humor

26611 readers
1674 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

Only valid in PHP?

you are viewing a single comment's thread
view the rest of the comments
[–] peacepath@lemmy.world 5 points 3 days ago (1 children)

Simple javscript casting, if the string contains at least one char, it means yes ; else it means no.

[–] Valmond@lemmy.world 3 points 3 days ago (1 children)
[–] peacepath@lemmy.world 3 points 3 days ago

I think javscrpit caste the strings "0" and "false" to true, yes...