Skip to Content
Logical Operators
Introduction to Logical Operators

Operators are special symbols used to assign, compare, combine, or simply, check values.

Up until this point, we’ve worked with various operators supported by Swift including arithmetic operators (like + and -), comparison operators (like > and <), the assignment operator (=), and more. In this lesson, we’ll explore another type of fundamental operators known as logical operators.

Logical operators determine a boolean result after combining or modifying true or false values. Swift supports the following logical operators:

  • && (AND)
  • || (OR)
  • ! (NOT)

Take a look at the tables on the right for a preview of each operator’s behavior. We’ll explain each behavior in depth in the upcoming exercises.


If you’re ready && excited to learn more about logical operators, click Next!

Folder Icon

Take this course for free

Already have an account?