method

sample

v1_9_1_378 - Show latest stable - Class: Array
sample(p1)
public

Choose a random element, or the random n elements, from the array. If the array is empty, the first form returns nil, and the second form returns an empty array.