---
title: "intersects(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsset/intersects(_:)"
---

# intersects(_:)

Returns a Boolean value that indicates whether at least one object in the receiving set is also present in another given set.

## Declaration

```swift
func intersects(_ otherSet: Set<AnyHashable>) -> Bool
```

## Parameters

- `otherSet`: The set with which to compare the receiving set.

## Return Value

Return Value true if at least one object in the receiving set is also present in otherSet, otherwise false.

## Discussion

Discussion Object equality is tested using isEqual:.

## See Also

### Comparing Sets

- [isSubset(of:)](foundation/nsset/issubset(of:).md)
- [isEqual(to:)](foundation/nsset/isequal(to:).md)
- [value(forKey:)](foundation/nsset/value(forkey:).md)
- [setValue(_:forKey:)](foundation/nsset/setvalue(_:forkey:).md)
