March 2024
Beginner to intermediate
680 pages
14h 40m
English
Overview
In this chapter, we’ll use branching logic and loops to demonstrate how logic can be controlled and selectively run. With these tools, you’ll have control of what you do and don’t want to run based on the values of variables.
By the end of this chapter, you will be able to implement branching logic using if, else, and else if; use switch statements to simplify complex branching logic; create looping logic using a for loop; loop over complex data collections using range; use continue and break to take control of the flow of loops; and use goto statements to jump to a labeled statement within a function.
For this chapter, you'll require Go version 1.21 or higher. The code for this chapter can ...
Read now
Unlock full access