@mirei/ts-collections
    Preparing search index...

    Function skip

    • Skips a specified number of elements before yielding the remainder of the sequence.

      Type Parameters

      • TElement

        Type of elements within the source iterable.

      Parameters

      • source: Iterable<TElement>

        The source iterable.

      • count: number

        Number of elements to bypass. Values less than or equal to zero result in no elements being skipped.

      Returns IEnumerable<TElement>

      A deferred sequence containing the elements that remain after skipping count items.

      Enumeration advances through the skipped prefix without yielding any of those elements.

      const numbers = [1, 2, 3, 4, 5];
      const skipped = skip(numbers, 2).toArray();
      console.log(skipped); // [3, 4, 5]