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