Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArrayIterator<T>

An iterator for an array-like object.

Notes

This iterator can be used for any builtin JS array-like object.

Type parameters

  • T

Hierarchy

  • ArrayIterator

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Construct a new array iterator.

    Parameters

    • source: ArrayLike<T>

      The array-like object of interest.

    Returns ArrayIterator

Properties

Private _index

_index: number = 0

Private _source

_source: ArrayLike<T>

Methods

clone

iter

  • Get an iterator over the object's values.

    Returns IIterator<T>

    An iterator which yields the object's values.

next

  • next(): T | undefined
  • Get the next value from the iterator.

    Returns T | undefined

    The next value from the iterator, or undefined.

Generated using TypeDoc