* 将一个数组分成几个同等长度的数组
* array[分割的原数组]
* size[每个子数组的长度]
*/function sliceArray(array, size) {
var result = []
for (var x = 0 x < Math.ceil(array.length / size) x++) {
var start = x * size
var end = start + size
result.push(array.slice(start, end))
}
return result
}
var example =[
[0,0,0,2,2,2,3,3,3],
[0,0,0,2,2,2,3,3,3],
[0,0,0,2,2,2,3,3,3],
[0,0,0,2,2,2,3,3,3],
]
var arr = [].concat.apply([],example).sort()
console.log(arr)