JavaScript Problem: Flattening an Array of Sub-arrays
A multi-dimensional array is basically an array of sub-arrays. What if you had such an array and you needed to flatten it; take all of the elements and include them in a single array without any sub-arrays. That is the problem we will solve in this tutorial. The solutions involves recursion and uses other syntax in interesting ways.
Would you like to help keep this channel going?
https://www.patreon.com/bePatron?u=7373521&redirect_uri=http%3A%2F%2Fallthingsjavascript.com%2Fcontribute.html&utm_medium=widget
Unlimited access to EVERY course for one low price: https://allthingsjavascript.teachable.com/p/javascript-the-complete-collection
Access to EVERY course via subscription (get 1 month free): https://www.skillshare.com/r/profile/Steven-Hancock/24508
Courses offered on Udemy at a discount (access from my site): http://allthingsjavascript.com/courses.html
Tutorials referred to in this video:
Map method of arrays: https://youtu.be/W5TtMAYUPGQ
Recursion: https://youtu.be/py7ZWFjrwEs
Another recursion tutorial: https://youtu.be/A4kWlbuefsU
Article on finding max number in array: https://medium.com/@stevenhancock83/javascript-tip-finding-the-min-and-max-value-in-an-array-2094eb19e0ee
For more resources on JavaScript:
http://www.allthingsjavascript.com
#javascript #AllThingsJavaScriptLLC