• Parameters

    • array: any[]

      an array containing any values

    Returns [any, any][]

    an array of arrays, type matching the input array type, where each inner array is a list of two.

    Description

    convert a list of items {any} into a list of pairs where each item is uniquely matched with another item (non-ordered) the number of pairs is (length * (length-1)) / 2