A set stores unique values of the same type in a collection without a defined order. Let's look at a diagram:
In the above diagram, we have two circles, both of which represent a set. On the left, we have Craig's favorite movies; and, on the right, we have Gabe's favorite movies.
Creating an empty set
Before we create these sets, let's just create an empty set and see what that looks like:
let movieSet = Set<String>()
In this first set, after the equals sign, we create the set and give it a data type of String. Then, we use the parentheses to initialize ...