Logical Operators

Logical Operators

Logical operators.
Logical operator Description
a AND b Logical AND: true when both of its operands are true
a OR b Logical OR: true when at least one of its two operands are true
NOT a Logical NOT: true when its one operand is false, and vice-versa.

Logical operators.
Logical operator Description
a && b Logical AND (&&): true when both of its operands are true
a || b Logical OR (||): true when at least one of its two operands are true
!a Logical NOT (!): true when its one operand is false, and vice-versa.