combination
combination<
T>(items,k):T[]
Defined in: src/global/collections.ts:104
k distinct elements, kept in their original order.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”Collection<T>
number
Returns
Section titled “Returns”T[]
Example
Section titled “Example”combination([1, 2, 3, 4, 5], 3); // [ 1, 4, 5 ]