User:Pjacobi/Draft/Operators
< User:Pjacobi | Draft
Logical
[edit | edit source]What's true, what's false?
[edit | edit source]0 == 0
ECMAScript | Lua | Perl | PHP | Python | Ruby | |
---|---|---|---|---|---|---|
0 == 1 | false | |||||
0 == 0 | true | |||||
0 | true | |||||
1 | true | |||||
-1 | true | |||||
"" | true | |||||
"0" | true | |||||
"1" | true | |||||
"1a" | true | |||||
"a" | true | |||||
nil/None/NULL | false |