function e(t){let r=[];return t.forEach(t=>{Array.isArray(t)?r=r.concat(e(t)):r.push(t)}),r}
result
[1,2,3,4,5,6,7,8,9]
e=>{let t=[],r=e=>{e.forEach(e=>{Array.isArray(e)?r(e):t.push(e)})};return r(e),t}
result
[1,2,3,4,5,6,7,8,9]
e=>e.reduce((e,t)=>e.concat(Array.isArray(t)?o(t):[t]),[])
result
[1,2,3,4,5,6,7,8,9]