---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IIterator.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/IIterator.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt

# IIterator

Interface for an iterator. The iterator allows you to iterate through all the items in a collection.

[Constructor](#constructor-summary) | [Fields](#properties-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
IIterator()
```

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [STOP_ITERATION](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IIterator.md#STOP_ITERATION) | Object | The object returned by the method [IIterator.getNext](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IIterator.md#getNext) at the end of the iteration. ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [getNext](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IIterator.md#getNext)() | Object\|[IIterator.STOP_ITERATION](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IIterator.md#STOP_ITERATION) | Returns a reference to the next item in the collection or the IIterator.#STOP_ITERATION object if the iteration is completed. ||
|#

## Fields details {#field_detail}

### STOP_ITERATION {#STOP_ITERATION}

```javascript
{Object} STOP_ITERATION
```

The object returned by the method [IIterator.getNext](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IIterator.md#getNext) at the end of the iteration.

## Methods details {#method_detail}

### getNext {#getNext}

```javascript
{Object|IIterator.STOP_ITERATION} getNext()
```

**Returns** a reference to the next item in the collection or the IIterator.#STOP_ITERATION object if the iteration is completed.