Math Fundamentals18 sections · 814 units
Open in Course

The OR Operator

At least one true

The OR operator returns true when at least one input is true. Written as || in most languages, or or in Python. Mathematically: ABA \lor B.

If both inputs are false, the result is false. Otherwise, true. Think of OR as offering alternatives: if any condition passes, you proceed.

Example: if (isAdmin || isOwner) allows access if either condition holds. If you're an admin but not the owner, you still get in.