---
title: "isSubset(of:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsset/issubset(of:)"
---

# isSubset(of:)

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

## Declaration

```swift
func isSubset(of otherSet: Set<AnyHashable>) -> Bool
```

## Parameters

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

## Return Value

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

## Discussion

Discussion Object equality is tested using isEqual:.

## See Also

### Comparing Sets

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