6 lines
118 B
JavaScript
6 lines
118 B
JavaScript
function pickRandom(array) {
|
|
return array[Math.floor(Math.random() * array.length)];
|
|
}
|
|
|
|
module.exports = pickRandom;
|