<!--
{
  "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/==(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Operator",
  "symbol" : {
    "kind" : "Operator",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SasSQRzlE2eeoiySbSayxG_ABtFZ"
  },
  "title" : "==(_:_:)"
}
-->

# ==(_:_:)

Returns a Boolean value indicating whether two arrays contain the same
elements in the same order.

```
static func == (lhs: Array<Element>, rhs: Array<Element>) -> Bool
```

## Parameters

`lhs`

An array to compare.

`rhs`

Another array to compare.

## Discussion

You can use the equal-to operator (`==`) to compare any two arrays
that store the same, `Equatable`-conforming element type.

---

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)