Types of Decisional Statements

Let's learn about conditional statements.

Decision-making is an important part of computer programs. The if, else if, and else statements identify which statement to run based on the Boolean value of an expression.

The if condition

The code in an if statement only executes if the condition is true. In the example below, there’s an if statement with an equality operator of ==.

Get hands-on with 1200+ tech skills courses.