nsarray push swift code example
Example 1: swift append to array
var numbers = [1, 2, 3, 4, 5]
numbers.append(100)
print(numbers)
// Prints "[1, 2, 3, 4, 5, 100]"
Example 2: add to beginning of array swift
//Swift 4
someArray.insert(someValue, at: 0)