Have you faced a nested array before? With nested i mean this for example:
If we want to access to all of it's elements one by one we will have to use nested map methods too, so to avoid that we can use the flat method
Which will return an array
This is all good and fun but if our main goal was to map across all of the items we still have to use map,so why don't we combine both methods in a single one?
Will do the job.
That's it,happy coding.
Ps:try these methods with this array
Top comments (0)