Collection Types

So far you've learned quite a lot! 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. Now 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 a list of key-value pairs; and sets, which store an unordered list of values.

By the end of this chapter, you'll have learned how to create arrays, dictionaries, and sets and how to perform operations on them.

The following topics will be covered:

  • Understanding arrays
  • Understanding dictionaries
  • Understanding sets
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.88.62