Chapter 6. Let computers do repetitive work

In this chapter you’ll learn how to make your app repeatedly perform an action using a loop.

This chapter covers

  • What are repetitions or iterations, and how are they used in programming?
  • What are loops, and how do you use the three types of loops?
  • Why do you need to repeat the same block of code multiple times?

Milestone 6, learn about loops, helps you write more efficient code. You’ve come a long way on your journey of programming in Swift. Chapter 1 gave you a head start. Chapter ...

Get Hello Swift! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.