Skip to content

Returns a random value from an array (or undefined if the array is empty)

Notifications You must be signed in to change notification settings

rojo2/random-pick

Repository files navigation

Random Pick

Travis CI

import randomPick from "@rojo2/random-pick";

const listOfNumbers = [1,2,3,4];
const number = randomPick(listOfNumbers); // random value from listOfNumbers 

Made with ❤️ by ROJO 2 (http://rojo2.com)

About

Returns a random value from an array (or undefined if the array is empty)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published