Skip to main content

CommonEnumerate

Callable

  • CommonEnumerate<T>(iterable, start, step): Generator<[index: number, value: T], void, any>

  • Iterate through the passed iterable and yield index/value pairs.


    Parameters

    • iterable: Iterable<T, any, any>

      The to-be iterated iterable

    • start: number = 0

      The starting index

    • step: number = 1

      The step size in which the index is incremented

    Returns Generator<[index: number, value: T], void, any>