Easy
How to Flatten a Nested Array in JavaScript Using Array Methods
Which of the following snippets correctly flattens the array [[1, 2], [3, 4], [5]] into a single-level array [1, 2, 3, 4, 5]?
1let arr = [[1, 2], [3, 4], [5]];
Which of the following snippets correctly flattens the array [[1, 2], [3, 4], [5]] into a single-level array [1, 2, 3, 4, 5]?
1let arr = [[1, 2], [3, 4], [5]];