choose<T>(lst: T[]): T

Choose a random item from a list.
// decide the best fruit randomly
const bestFruit = choose(["apple", "banana", "pear", "watermelon"])
kaplay logo

3001.0.0-alpha.18

Misc