const _arr = [[21,213],[1,43,125,89],[[23,54],90,389],12];[...new Set(_arr.flat(Infinity))].sort((a,b)=>{ return a-b})(11) [1, 12, 21, 23, 43, 54, 89, 90, 125, 213, 389]
本文共 230 字,大约阅读时间需要 1 分钟。
const _arr = [[21,213],[1,43,125,89],[[23,54],90,389],12];[...new Set(_arr.flat(Infinity))].sort((a,b)=>{ return a-b})(11) [1, 12, 21, 23, 43, 54, 89, 90, 125, 213, 389]
转载于:https://www.cnblogs.com/chenzeyongjsj/p/11234998.html