Skip to content

getRandomChoice()

Picks a random element from the provided array.

Example:

ts
const fruit = getRandomChoice(['apple', 'banana', 'orange']);

Released under the MIT License.