Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
The logical OR operator (||) can also be used in combination with the logical NOT operator (!). It checks whether at least one of the original value or its negation is true.
Related terms
Logical OR operator (||): Combines two boolean values and returns true if at least one of them is true.
Logical NOT operator (!): Reverses the boolean value. If it was originally false, applying NOT makes it true; if it was originally true, applying NOT makes it false.
Boolean value: A data type that can have one of two possible values - true or false.