randomFromArray
randomFromArray(random, array) ⇒ T | undefined
Kind: global function
Returns: T | undefined - returns undefined only if that value is in the array or if array is empty
| Param | Type | Description |
|---|---|---|
| random | function | if you don't have a custom RNG, you can always pass Math.random instead |
| array | Array.<T> |