题目:数组平铺,去重,然后排序[15, [1, new Number(1), 2], {a: 3, b: [4, 7, 8]}, [6, 7, 8, 9, [11, 12, [12, 13, [14]]]]]
function arrayOpe (param){
var newData = [];
(function getArray(v){console.log(v,v instanceof Object)
if(v instanceof Number || typeof v === “number”){
newData.push(v);
}else if(v instanceof Array){
v.forEach(x=>{
if(x instanceof Number || typeof x === “number”){
newData.push(x)
}else if(x instanceof Array || x instanceof Object){
getArray(x)
}
})
}else if(v instanceof Object){
let keys = Object.keys(v);
keys.forEach(y=>{ getArray(v[y] })
}
})(param)
newData =newData.sort((x,y)=>x-y);
return (new Set(newData))
}