Comparison of Conditional Statements

Let's look at the execution flow of different conditional statements using the debugger.

In this lesson, we’ll look at the execution flow of different conditional statements (if, if-else, and switch) by executing the code line-by-line using the debugger.

We’ll use the same program example for all conditional statements. This might appear repetitive, but the goal is to understand how each conditional statement executes and to bring more clarity on how it’s different from the others.

Instruction: Run and execute the codes step-by-step for all conditional statements (if, if-else, and switch).

Create a free account to view this lesson.

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