().split(','))
var arr2 = arr.toString().split(',').sort((a, b) => a - b).map(Number)...(flatAll(arr))
2.利用es6数组降维方法
var arr = [[1, 2, 2], [3, 4, 5, 5], [6, 7, 8, 9, [11, 12, [12, 13, [...14]]]], 10];
function flatAll(arr) {
while (arr.find(item => typeof item === 'object')) {...arr = arr.flat()
}
arr = arr.sort((x, y) => x - y)
return Array.from...(new Set(arr));
}
console.log(flatAll(arr));