Chapter 3. Control Flow
In the previous chapter, we covered the basics of GO data types and, in a few examples, used flow control to print messages.
In this chapter, we’ll use what we learned about comparison operators and boolean values to learn more about flow control.
Elements of Flow control
Programs are like water in a river because they tend to flow in one direction. And like water in a river, parts of it can go off into separate outlets based upon the river’s conditions, such as a boulder in the stream or a dam.