slanted-gamedev-toolz
Version:
A slanted mix of tools for your brilliant ideas in game design.
13 lines (12 loc) • 396 B
TypeScript
/**
* Returns a random item from the provided array.
*
* @param {any[]} array - The array to pick a random item from.
* @returns {any} A random element from the array.
*
* @example
* const fruits = ['apple', 'banana', 'cherry'];
* const randomFruit = randomArrayItem(fruits);
* console.log(randomFruit); // e.g., 'banana'
*/
export declare const randomArrayItem: (array: any[]) => any;