Chooses one element at random from the provided array using uniform
distribution. Each element has an equal probability of being selected. This
is a convenience function equivalent to sampling with a count of 1, but
returns the element directly rather than an array containing one element.
Randomly selects a single element from an array.
Chooses one element at random from the provided array using uniform distribution. Each element has an equal probability of being selected. This is a convenience function equivalent to sampling with a count of 1, but returns the element directly rather than an array containing one element.
Example