[@qodestack/utils](../../README.md) / [arrays](../README.md) / getRandomArrayItem

# Function: getRandomArrayItem()

> **getRandomArrayItem**\<`T`\>(`array`): `T`

Defined in: [arrays.ts:66](https://github.com/qodesmith/utils/blob/c8fab201f6be19f3a72a76d2430b77244cece7bb/src/arrays.ts#L66)

Returns a random item from the given array.

## Type Parameters

### T

`T`

## Parameters

### array

`T`[] \| readonly `T`[]

The array from which to select a random item.

## Returns

`T`

A random item from the array.
