---
title: "+=(_:_:)"
framework: swift
role: symbol
role_heading: Operator
path: "swift/array/+=(_:_:)-676ib"
---

# +=(_:_:)

Appends the elements of a sequence to a range-replaceable collection.

## Declaration

```swift
static func += <Other>(lhs: inout Self, rhs: Other) where Other : Sequence, Self.Element == Other.Element
```

## Parameters

- `lhs`: The array to append to.
- `rhs`: A collection or finite sequence.

## Discussion

Discussion Use this operator to append the elements of a sequence to the end of range-replaceable collection with same Element type. This example appends the elements of a Range<Int> instance to an array of integers. var numbers = [1, 2, 3, 4, 5] numbers += 10...15 print(numbers) // Prints "[1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15]" note: O(m), where m is the length of the right-hand-side argument.

## See Also

### Combining Arrays

- [append(contentsOf:)](swift/array/append(contentsof:).md)
- [append(contentsOf:)](swift/array/append(contentsof:)-9foli.md)
- [+(_:_:)](swift/array/+(_:_:)-6h58k.md)
- [+(_:_:)](swift/array/+(_:_:)-n33n.md)
- [+(_:_:)](swift/array/+(_:_:).md)
- [+(_:_:)](swift/array/+(_:_:)-9fm5l.md)
- [+=(_:_:)](swift/array/+=(_:_:).md)
