Function makePairs

  • Makes pairs with each element and its next one.

    Type Parameters

    • T

    Parameters

    • array: T[]

      A list of elements.

    Returns [T, T][]

    Example

    [1, 2, 3, 4] --> [[1, 2], [3, 4]]
    

Generated using TypeDoc