You may also like Array.flat()
Supported on all browsers except edge and ie. if you are already using Babel then you can use without issue.
HOW TO FLATTEN AN ARRAY WITH JUST 1 LINE OF CODE! DEVS HATE HIM
Post here is to understand how we could write utility functions ourselves. Getting to know what's happening under the Hood.😅
Oh absolutely! It’s a valuable thing being able to understand what’s going on behind the scenes.
I only suggested .flat() incase you or others weren’t aware of it. As Its a relatively new addition.
.flat()
Sure thing Agreed. I'll add about Array.flat too in the above Post . 😄
Array.flat
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You may also like Array.flat()
Supported on all browsers except edge and ie. if you are already using Babel then you can use without issue.
HOW TO FLATTEN AN ARRAY WITH JUST 1 LINE OF CODE! DEVS HATE HIM
Post here is to understand how we could write utility functions ourselves. Getting to know what's happening under the Hood.😅
Oh absolutely! It’s a valuable thing being able to understand what’s going on behind the scenes.
I only suggested
.flat()
incase you or others weren’t aware of it. As Its a relatively new addition.Sure thing Agreed. I'll add about
Array.flat
too in the above Post . 😄