With numeric types and strings, one thing we’ll frequently want to do is to put them into collections. Nearly all languages have multiple ways of putting items into groups so we can then organize and perform operations on the entire group. Swift provides three main types of collections: arrays, sets, and dictionaries.
To start playing with these, start a new playground called CollectionsPlayground, and delete the line that creates the "Hello, playground!" string.
For many of us, the most frequently used collection is the array. Arrays contain multiple items and maintain the ordering of those items. They also allow for the same item to appear multiple times in the array.
We’ll start with an array of strings ...