Mar 27, 2018

Sorting a JavaScript Array in Random Order

var p = [4, 80, 10, 15, 5, 10];

p.sort(function(a, b){return 0.5 - Math.random()});