sajad torkamani
[2, 4, [5, [6, [7, [8]]]]].flat(Infinity)
// => [2, 4, 5, 6, 7, 8]

Tagged: JavaScript

Leave a comment

Your email address will not be published. Required fields are marked *