Learn

Every program we’ve seen so far has only had one possible path of execution — they all execute line by line, from top to bottom. And every time you run one of those programs, it gives you the same exact result. But it’s the twenty-first century, and we like options!

In this lesson, we will explore how programs make decisions by evaluating conditions and introduce logic into our code!

We’ll be covering the following concepts:

  • if, else if, and else statements
  • switch statements
  • Relational operators
  • Logical operators

So… if you’ve already learned these concepts in another language, go to the next lesson — else, prepare yourself and let’s get started!

Instructions

Click Next to continue.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?