Flatten a Nested Array in JavaScript with Array.prototype.flat

This is an example of how to use the flat method available on the array prototype in JavaScript.
This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.
This is an example of how to use the flat method available on the array prototype in JavaScript.
Access all courses and lessons, track your progress, gain confidence and expertise.