将数组扁平化并去除其中重复数据,最终得到一个升序且不重复的数组

251 阅读1分钟

ES6的基本知识点:

    Array.from(new Set(arr.flat(Infinity))).sort((a,b) => a-b)