Control flow statements allow your program to make decisions and execute different blocks of code based on certain conditions.

4.1 if, else if, else statements

The if statement executes a block of code if a specified condition is true. You can extend it with else if for multiple conditions and else for a default case.

4.2 switch statements

The switch statement is an alternative to long if-else if chains when you're checking a single variable against multiple possible values.

4.3 Conditional (Ternary) Operator for Decisions

As seen in Chapter 3, the ternary operator (condition ? valueIfTrue : valueIfFalse;) is a concise way to make simple conditional assignments or expressions.