Learn

Often, when we are trying to create a control flow for our program, we’ll encounter situations where the logic cannot be satisfied with a single condition.

Logical operators are used to combine two or more conditions. They allow programs to make more flexible decisions. The result of the operation of a logical operator is a bool value of either true or false.

There are three logical operators that we will cover:

  • &&: the and logical operator
  • ||: the or logical operator
  • !: the not logical operator

We will also discuss the order of operations.

Let’s get started!

Instructions

Click Next to continue.

Folder Icon

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?