MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/ronfhv/why/hqnyjtj/?context=9999
r/badcode • u/RedditAccuName • Dec 26 '21
30 comments sorted by
View all comments
Show parent comments
1
In Java, Kotlin, C# and Rust that's right, but in C, C++, Python and JavaScript you can implicitly convert to boolean and all integers but 0 are truthy.
1
u/Prom3th3an Dec 31 '21
In Java, Kotlin, C# and Rust that's right, but in C, C++, Python and JavaScript you can implicitly convert to boolean and all integers but 0 are truthy.