ts-iterable-functions
    Preparing search index...

    Function _elementAt

    • Returns the element at the specified zero-based index from the source iterable.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Parameters

      • src: Iterable<T>

        Source iterable to enumerate.

      • index: number

        Zero-based index of the element to retrieve.

      Returns T

      The value found at index.

      Error When the iterable does not contain an element at the requested index.

      const third = _elementAt(["a", "b", "c", "d"], 2);
      console.log(third); // "c"

      or using the curried version:

      const third = pipeInto(["a", "b", "c", "d"], elementAt(2));
      console.log(third); // "c"