pick
pick<
T>(items):T
Defined in: src/global/collections.ts:15
One element. Throws when the collection is empty.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”Collection<T>
Returns
Section titled “Returns”T
Example
Section titled “Example”pick(["rock", "paper", "scissors"]); // "paper"pick("abcdef"); // "d"pick(new Set([1, 2, 3])); // 2