API Reference

Returns a random element from an array.

function getRandomItem<T>(arr: T[]): T

// Example:

getRandomItem([1, 2, 3, 4, 5, 6]) //=> 3