Chapter 20 : Logical Operators



Comparison Operators

Logical operators are used to control the flow in Swift Programming.

They are mostly used with if, while, or some other control statement.

The result is a Bool value.

Logical operators are binary operators (except NOT !).

List of Logical Operators

Operator   Syntax		Result
=================================================================================
AND       op1 &&  op2		TRUE if both op1 and op2 are TRUE.
OR        op1 ||  op2		TRUE if either op1 or $op2 is TRUE.
NOT       !op			TRUE if op is not TRUE.