JavaScript Developer — Hard
Key points
- The `flat()` method removes nested arrays
- The parameter `Infinity` ensures all levels of nesting are flattened
- The final output is a single-level array with all elements
- Remember to use `flat()` with the appropriate parameter
Ready to go further?
Related questions
