+ 2
What is a ||
||
6 Answers
+ 17
As an example for Luca's explanation, consider the following snippet
bool b1 = true;
bool b2 = false;
bool b3 = false;
bool b4 = true;
bool x = b1 || b2; // true || false = true
bool y = b2 || b3; // false || false = false
bool z = b1 || b4; // true || true = true
bool w = b2 || b3 || b4; // false || false || true = true
+ 7
"or"
+ 5
pipeline
+ 4
hi,
For the built-in logical OR operator, the result isĀ trueĀ if either the first or the second operand (or both) isĀ true. This operator is short-circuiting: if the first operand isĀ true, the second operand is not evaluated.
+ 3
it is Boolean operator for 'or'
+ 2
In SQL (except MySQL) it's string concatenation.