Summary
Control statements are at the heart of computer programming. They are all about evaluating conditions to perform a certain block of code once or in a loop. To craft Boolean expressions, we have applied Boolean constants, Boolean values in variables, and logical operators. Also, logical and relational comparison can be applied to expressions that are to be used as a precondition for a branch of code.
To deal with complex scenarios, we learned how easily we can compose nested control structures and how we can conditionally break out of a branch or skip a certain loop iteration. We also learned to avoid deep nesting to reduce the amount of time spent on future code maintenance. We need to carefully decide which branching or looping technique is suitable for a specific scenario and we need to be certain that our loops do not run to infinity.
Finally, having reached the end of this chapter, we should be able to write smaller sized scripts to perform operations that involve...