Almost every app you build will store groups of data and make decisions about what to do with it. This module covers the Swift tools for both: collections to hold your data and control flow to act on it.
You'll start with the three core collection types, arrays, dictionaries, and sets, and learn when to reach for each one. Then you'll move on to if / else if / else and switch statements for branching logic, and for loops for repeating work over ranges and collections.
Practice along in an Xcode playground as you watch. Once these feel comfortable, continue on to Functions, Closures & Optionals.
An overview of Swift's three core collection types and how to work with each of them.
Store and manipulate collections of data with arrays and sets, and see how they differ.
Make decisions in your code with if, else if, and else.
Handle multiple conditions cleanly with Swift's switch statement.
Repeat code a set number of times by looping over ranges.
Iterate over arrays, sets, dictionaries, and other collections with for-each loops.