September 2024
Intermediate to advanced
743 pages
27h 48m
English
You can use control structures to define which path a program should take. Let’s say, on a registration form, you want to display a message when the user enters an invalid value, for example, a password that is too short. Perhaps you want to dynamically generate a table on a web page based on a list of data, and you want the code to work regardless of the length of the list.
For these cases, programming languages provide control structures to define whether a statement block should be executed and how often. You can achieve the former decision point using conditional statements or branching and the latter decision point using loops or repetitions.
You can define ...
Read now
Unlock full access