As with strings, Swift moves support for the most common collections directly into the language, which makes them significantly easier to work with than the Objective-C approach of calling methods on objects.
Swift provides direct language support for two essential collections: arrays and dictionaries. Arrays, as in most languages, are ordered lists of objects.
var musicGenres = ["Pop", "Rock", "Jazz", "Hip-hop", "Classical"]
Because of type inference, Swift knows this is an array of Strings. We could make that explicit by making the declaration var musicGenres: [String].
We can access array members by a zero-based index, inside square braces. We can also get a sub-array by using the range operator, where ..< includes the ...