---
title: "skip(by:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/borrowingiteratorprotocol/skip(by:)"
---

# skip(by:)

Advances the position of this iterator by the specified offset, or until the end of the underlying type’s elements.

## Declaration

```swift
mutating func skip(by maximumOffset: Int) -> Int
```

## Parameters

- `maximumOffset`: The maximum number of elements to offset the position of this iterator. maximumOffset must be nonnegative.

## Return Value

Return Value The number of items that were skipped. If the returned count is less than maximumOffset, then the underlying type did not have enough elements left to skip the requested number of items. In that case, the iterator’s position is set to the end of the underlying type.
