Gets a random element from array.
array
The array to sample.
Returns the random element.
2.0.0
sample([1, 2, 3, 4])// => 2 Copy
sample([1, 2, 3, 4])// => 2
Gets a random element from
array
.