Decide with if

In this lesson, we will go over how to use the `if` expression.

We'll cover the following


The if expression is a conditional statement. It allows you to incorporate conditions in your code which need to be fulfilled before the code can execute.

Conditional statements are incredibly powerful as they take the state of the program into consideration and act accordingly. This results in smarter compilation as the compiler is now provided with a decision-making capability.

Control Flow

Let’s look at the control flow of if.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy