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

# adding(_:)

Returns an index path containing the nodes in the receiving index path plus another given index.

## Declaration

```swift
func adding(_ index: Int) -> IndexPath
```

## Parameters

- `index`: Index to append to the index path’s indexes.

## Return Value

Return Value A new index path containing the receiving index path’s indexes and index.

## See Also

### Adding and Removing Nodes

- [removingLastIndex()](foundation/nsindexpath/removinglastindex().md)
