Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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