Returns a Random element from the array.
name | type | arguments | Default | description |
---|---|---|---|---|
array | array |
The array to select the random entry from. |
||
startIndex | number | <optional> | 0 |
An optional start index. |
length | number | <optional> | array.length |
An optional length, the total number of elements (from the startIndex) to choose from. |
A random element from the array, or null
if no element could be found in the range given.