This website uses cookies to ensure you get the best experience on our website. Read more...
How to Flatten an Array in JavaScript
input = [[1, 2], [1, 3], [3, 4, 5, 6], [3, 5, [6, 8]]] Exp Out = [1, 2, 1, 3, 3, 4, 5, 6, 3, 5, 6, 8]