Chapter 6. Lists and loops
Chapter 5 showed you how apps can remember things. In this chapter, we’ll build on that idea to make apps that remember and use collections of things using a special type of variable: the list. You’ll also find out how to make apps that repeat an action several times using loops.
Lists are all around you—especially in the technology you use. If you think about it, we bet you can think of at least five lists you’ve used today. Here are some examples:
- Choosing a person to send a message to from your contacts list
- Choosing a ring tone from a list of sound files
- Reading a list of updates from your friends on social media
- Choosing a TV program to record from a TV planner list
- Selecting a way to pay from a list of ...