---
title: "==(_:_:)"
framework: swift
role: symbol
role_heading: Operator
path: "swift/arrayslice/==(_:_:)"
---

# ==(_:_:)

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

## Declaration

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

## Parameters

- `lhs`: An array to compare.
- `rhs`: Another array to compare.

## Discussion

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