shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
pickRandom
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.array
Pick a random item in the passed array
Params
- array*-Array
The array from which to pick a random item
Return
- -Any
A random array item
Example
import { pickRandom } from '@blackbyte/sugar/array';
const array = ['hello','world'];
pickRandom(array); // => 'world'Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space