JavaScript - Random Array Sort
Table of Contents
#
JavaScript - Random Array Sort
function randOrd(){
return (Math.round(Math.random())-0.5);
}
anyArray = [1, 's', 3, 'arr', 4];
anyArray.sort( randOrd );
alert(anyArray);