升序
const arr = [[1,2,3,[12,13,[15,17]]],[7,8,9],[4,6,10]]
let i = arr.join(",").split(",")
console.log(i.sort((a,b)=>{
return a - b
}))
// ['1', '2', '3', '4', '6', '7', '8', '9', '10', '12', '13', '15', '17']
降序
const arr = [[1,2,3,[12,13,[15,17]]],[7,8,9],[4,6,10]]
let i = arr.join(",").split(",")
console.log(i.sort((a,b)=>{
return b - a
}))
// ['17', '15', '13', '12', '10', '9', '8', '7', '6', '4', '3', '2', '1']