Or operator
From Coderwiki
More actions
The or operator is a boolean operator which will return true if either of the two boolean values either side of it are true.
Syntax
edit edit sourceIn many languages, the and operator uses the || symbols.
In some other languages, a keyword is used instead: in Python, for example, this keyword is or.
Examples where or returns true
edit edit sourcetrue || true
true || false
4 < 7 || 2 > 9
Examples where and returns false
edit edit sourcefalse || false
16 < 10 || 5 == 8
false || 9 != 9