leafiy
5/18/2018 - 6:53 PM

array shuffle value #js #array

sample

const sample = arr => arr[Math.floor(Math.random() * arr.length)];
// sample([3, 7, 9, 11]) -> 9