function flatten(arr) {
let flat = []
for(let prop of arr){
if(Array.isArray(prop)){
flat.push(...flattan(prop))
} else {
flat.push(prop)
}
}
return flat
}
function flatten(arr) {
let flat = []
for(let prop of arr){
if(Array.isArray(prop)){
flat.push(...flattan(prop))
} else {
flat.push(prop)
}
}
return flat
}