Skip to content

Instantly share code, notes, and snippets.

@im7mortal
Created May 14, 2014 11:40
Show Gist options
  • 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