I run into the following problem, the following array: [[1,2,3],[4,5,6],[7,8,9]]
I must go through it and get the following result [1, 2,3,4,5,6,7,8,9]
. Currently I get the same result. Here my code:
let main= [[1,2,3],[4,5,6],[7,8,9]]
let result= [].concat(
main.map((e)=>{
return e
})
)
console.log(result)