---
title: "symmetricDifference(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/indexset/symmetricdifference(_:)"
---

# symmetricDifference(_:)

Exclusive or the IndexSet with other.

## Declaration

```swift
func symmetricDifference(_ other: IndexSet) -> IndexSet
```

## See Also

### Combining Index Sets

- [formIntersection(_:)](foundation/indexset/formintersection(_:).md)
- [formSymmetricDifference(_:)](foundation/indexset/formsymmetricdifference(_:).md)
- [formUnion(_:)](foundation/indexset/formunion(_:).md)
- [intersection(_:)](foundation/indexset/intersection(_:).md)
- [union(_:)](foundation/indexset/union(_:).md)
