Skip to content

Instantly share code, notes, and snippets.

@im7mortal
Created May 14, 2014 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save im7mortal/a2c869fce8475a23f84f to your computer and use it in GitHub Desktop.
Save im7mortal/a2c869fce8475a23f84f to your computer and use it in GitHub Desktop.
syntax
function mixer(arr){
for ( var i = arr.length; i-->0; ) {
var t = arr[i],
j = Math.floor(i*Math.random());
arr[i] = arr[j];
arr[j] = t;
}
return arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment