Tell us what’s happening:
Describe your issue in detail here.
I got to this point of the code. i kinda have an idea where im headed. i know i need to set up some recursion. but im not sure of the best way to set it up. some advice on getting to the right direction would be helpful.
**Your code so far**
function steamrollArray(arr) {
let steamroll=[];
for (let i = 0; i < arr.length; i++){
if (Array.isArray(arr[i])){
steamroll.push(arr[i])
}
}
return arr;
}
steamrollArray([1, [2], [3, [[4]]]]);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Challenge: Steamroller
Link to the challenge: