Returns random element.
import { Arrays } from 'https://unpkg.com/ixfx/dist/data.js';const v = [`blue`, `red`, `orange`];Arrays.randomElement(v); // Yields `blue`, `red` or `orange` Copy
import { Arrays } from 'https://unpkg.com/ixfx/dist/data.js';const v = [`blue`, `red`, `orange`];Arrays.randomElement(v); // Yields `blue`, `red` or `orange`
Use randomIndex if you want a random index within array.
array
Random generator. Math.random by default.
Math.random
Returns random element.
Use randomIndex if you want a random index within
array
.