User:Pjacobi/Draft/Operators

From Wikibooks, open books for an open world
Jump to navigation Jump to search

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

Behaviour of logical or

[edit | edit source]