Function: pickRandom()
Call Signature
pickRandom<
T>(array: readonlyT[],amount?:1):T
Defined in: pickRandom.ts:6
Picks a random element from an array
Type Parameters
| Type Parameter | 
|---|
| T | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| array | readonly T[] | The array to pick a random element from | 
| amount? | 1 | Amount of values to obtain randomly (default: 1) | 
Returns
T
Call Signature
pickRandom<
T>(array: readonlyT[],amount:number):T[]
Defined in: pickRandom.ts:7
Picks a random element from an array
Type Parameters
| Type Parameter | 
|---|
| T | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| array | readonly T[] | The array to pick a random element from | 
| amount | number | Amount of values to obtain randomly (default: 1) | 
Returns
T[]