1//To add a new element to the end of an Array.
2anArray.append("This String")
3
4//To append a different Array to the end of your Array.
5anArray += ["Moar", "Strings"]
6anArray.append(contentsOf: ["Moar", "Strings"])
7
8// To insert a new element into your Array.
9anArray.insert("This String", at: 0)
10
11// To insert the contents of a different Array into your Array.
12anArray.insert(contentsOf: ["Moar", "Strings"], at: 0)
1var numbers = [1, 2, 3, 4, 5]
2numbers.append(100)
3print(numbers)
4// Prints "[1, 2, 3, 4, 5, 100]"