Contents

adding(_:)

Returns a new array that is a copy of the receiving array with a given object added to the end.

Declaration

func adding(_ anObject: Any) -> [Any]

Parameters

  • anObject:

    An object.

Return Value

A new array that is a copy of the receiving array with anObject added to the end.

Discussion

If anObject is nil, an NSInvalidArgumentException is raised.

See Also

Related Documentation

Deriving New Arrays