I’m doing intermediate algorithm challenge and kind of got stuck with this challenege. problem is that actually I do get correct answer for every test array but none is accepted as correct answer. I see only difference is space between array elements but is that even thing? how should I put space around numbers? please check my code and help to understand what am I doing wrong.
> function steamrollArray(arr) {
> // I'm a steamroller, baby
> myRecursion(arr);
> return myArr;
> }
> var myArr = [];
> function myRecursion(arr){
>
> for(var i = 0; i < arr.length; i++){
> if(Array.isArray(arr[i])){
> myRecursion(arr[i]);
> }
> else {
> myArr.push(arr[i]);
> }
> }
> }
> steamrollArray([1, [], [3, [[4]]]]);