其实蛮容易实现的,关键是简洁与否,下面是我自己写的. function randomSort(a){ var arr = a, random = [], len = arr.length; for (var i = 0; i < len; i++) { var index = Math.floor(Math.random()*(len - i)); random.push(a[index]); arr.splice(index,1); } return random; } var a = [1,…