Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 10:46, 15 August 2025 by Dylan (talk | contribs) (new: info, syntax, examples where true, examples where false)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The or operator is a boolean operator which will return true if either of the two boolean values either side of it are true.

In 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 source
true || true
true || false
4 < 7 || 2 > 9

Examples where and returns false

edit edit source
false || false
16 < 10 || 5 == 8
false || 9 != 9