O'Reilly logo

Swift for Beginners: Develop and Design, Second Edition by Boisy G. Pitre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Working with Collections

The last chapter covered a lot of Swift’s basics, with plenty of examples (including intentional mistakes) in order to reinforce the concepts of variables, constants, and types. As you’ll see, the information in Chapter 1 will come in handy in this and subsequent chapters.

For this chapter, get ready to turn your attention to the notion of collections.

When you think of a collection, what comes to mind? Here are several examples of collections you might have had at one time or another:

Image Assortment of toy action figures and accessories

Postage stamps or coins from different countries

Shopping list of items to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required