An array is every developer's best friend and saves the collection of data in an ordered list. In Swift, an array is very easy to use and contains many helpful methods for use. Before exploring it, we have to clarify some important points.
Array by default is mutable so that it accepts adding, changing, or removing items from it, except if we define it as a constant, using
let. In this case, it will be immutable, as it becomes constant.
In Objective-C, you can save any type of object, and you won't have to specify any information about their type. In Swift, arrays are typed; this means that the type of item should be clear, and all the items should be of the same type. The type can be defined explicitly, or it can be inferred.
An array doesn't ...