June 2025
Beginner
817 pages
31h 30m
English
Conditional statements or branches allow you to influence the flow of the program by defining a condition and thus deciding at which point the program should be continued. The following options are available to you:
You can use if to branch to a block of statements that are executed only if the condition in the parentheses of if() equals true. This is also called a conditional branch.
You can use else with a block of statements that will be executed only if the previously checked if condition was equal to false.
else if can be used with a block of statements to test another condition if the preceding if was equal to false. After a preceding if, you can use multiple else if conditions. Alternatively, ...
Read now
Unlock full access