# 数组打乱顺序shuffle

const shuffle = function(array) {
  let m = array.length;
  let t;
  let i;
  while (m) {
    i = Math.floor(Math.random() * m--);
    t = array[m];
    array[m] = array[i];
    array[i] = t;
  }
  return array;
};
Last Updated: 6/25/2021, 6:35:25 AM