SOURCE

var arr = [[1, 2, 3], [3, 4, 5, 5], [6],[7, [8]],[9]]

console.log(Array.from(new Set(arr.flat(Infinity).sort((a,b) => a - b))))
console 命令行工具 X clear

                    
>
console