Returns a new array that is a copy of the receiving array with a given object added to the end.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
A new array that is a copy of the receiving array with
anObject added to the end.
NSInvalidArgumentException is raised.
Deriving New Arrays
func filtered(using: NSPredicate)
Evaluates a given predicate against each object in the receiving array and returns a new array containing the objects for which the predicate returns true.
func subarray(with: NSRange)
Returns a new array containing the receiving array’s elements that fall within the limits specified by a given range.