Skip to content

Instantly share code, notes, and snippets.

@Mark24Code
Created January 10, 2018 09:11
Show Gist options
  • Save Mark24Code/e38383234ed8b5701a746ecb3ee23313 to your computer and use it in GitHub Desktop.
Save Mark24Code/e38383234ed8b5701a746ecb3ee23313 to your computer and use it in GitHub Desktop.
乱序数组算法
function unorderArr(arr){
let carr = arr.concat();
carr.sort(function(x,y){
return 0.5-Math.random()
})
return carr
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment