Methods
(inner) pick(arr, n) → {Array}
Randomly selects a specified number of elements from an array
Parameters:
| Name | Type | Description |
|---|---|---|
arr |
Array | The array to select from |
n |
number | The number of random elements to select from the array |
Throws:
IllegalArgumentException
Returns:
- A new array containing the randomly selected elements
- Type
- Array