const ArrayRandomModule = {// get random item from arrayrandom: function (array) {return array[Math.random() * array.length | 0];},
// [mutate]: extract from given array a random itempick: function (array, i) {return array.splice(i >= 0 ? i : Math.random() * array.length | 0, 1)[0];},
// [mutate]: shuffle the given arrayshuffle: function (array) {for (var i = array.length; i > 0; --i)array.push(array.splice(Math.random() * i | 0, 1)[0]);return array;}}