In the last chapter, you looked at conditionals, which allow you to do different things based on different conditions, and optionals, which enable you to create variables that may or may not have a value. You were able to create more complex programs.
Sometimes, you will need to represent a range of numbers instead of discrete values. Swift uses range operators for this, which makes it easy to specify the start and end points for a range. You will learn about the different types of range operators in this chapter.
In programming, you frequently need to repeat an operation over and over again. Swift handles this by using loops. You can repeat a sequence a fixed number of times, or repeat a sequence until a condition is met. You will learn about the different types of loops in this chapter.
By the end of this chapter, you'll have learned how to use...