14.2 Swift Array Initialization
An array is a data type designed specifically to hold multiple values in a single ordered collection. An array, for example, could be created to store a list of String values. Strictly speaking, a single Swift based array is only able to store values that are of the same type. An array declared as containing String values, therefore, could not also contain an Int value. As will be demonstrated later in this chapter, however, it is also possible to create mixed type arrays. The type of an array can be specified specifically using type annotation or left to the compiler to identify using type inference.
An array may be initialized with a collection of values (referred to as an array literal) at creation time using the following syntax:
var variableName: [type] = [value 1, value2, value3, ……. ]
The following code creates a new array assigned to a variable (thereby making it mutable) that is initialized with three string values:
...