Steamroll Array
In this activity I was given I couldn’t really understand what was needed from me, because the problem itself was vague for me. I asked for a better understanding from my pears and they did help with explaining what was needed from me to do.
Problem
Flatten a nested array. You must account for varying levels of nesting.
Approach
I has an empty array, followed by a for-loop that will iterate through each an every array we are given and an if-statement were we are calling a function to concatenate the whole array and make it one everytime it checks and find if is an array. Lastly I pushed the array we were given to an empty array, so that after checking it pushes the flattened array to the empty array.
Conclusion
I have learned about concatenate since I have never used it before and I got to understand what was needed from me inoder to complete this activity.