filmov
tv
Program 17 Array flat method | JavaScript Interview Questions | Nested arrays
![preview_player](https://i.ytimg.com/vi/erDF2ad9VLY/maxresdefault.jpg)
Показать описание
var arr= [[1,2],[3,[2]],[[2,5,[4]]]];
Output:
[1, 2, 3, 2, 2, 5, 4]
The resulting flatArr contains all the elements from the original nested arr array in a flat structure.