利用Array.prototype.sort方法和Math.random()
var arr = [1,2,3,4,5,6,7,8,9,10];
var out = arr.sort(function(){
  return Math.random() > 0.5;
}

相关文章:

  • 2022-01-04
  • 2021-05-19
  • 2022-03-07
  • 2021-07-08
  • 2021-11-05
  • 2022-02-11
  • 2021-06-13
猜你喜欢
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
相关资源
相似解决方案