5 Collection Types
Join our book community on Discord
You've learned quite a lot at this point! You can now create a program that stores data in constants or variables and performs operations on them, and you can control the flow using conditionals and loops. But so far, you've mostly been storing single values.
In this chapter, you will learn ways to store collections of values. Swift has three collection types: arrays, which store an ordered list of values; dictionaries, which store an unordered list of key-value pairs; and sets, which store an unordered list of values.
By the end of this chapter, you'll have ...
Get iOS 18 Programming for Beginners - Ninth Edition 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.