var arr = [1,2,3,4,5,6,7,8,9,10];

function Arandom(a,b){

  return (Math.random() > 0.5) ? 1 : -1;;

}

arr.sort(Arandom);

console.log(arr)

相关文章:

  • 2021-07-19
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-03-08
  • 2021-12-10
  • 2022-12-23
  • 2022-03-05
猜你喜欢
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
相关资源
相似解决方案