<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Array/+=(_:_:)-676ib",
  "metadataVersion" : "0.1.0",
  "role" : "Operator",
  "symbol" : {
    "kind" : "Operator",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SmsE2peoiyyxz_qd__tSTRd__7ElementQyd__ABRtzlFZ::SYNTHESIZED::s:Sa"
  },
  "title" : "+=(_:_:)"
}
-->

# +=(_:_:)

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

```
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

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]"
```

> Complexity: O(*m*), where *m* is the length of the right-hand-side
> argument.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)