Steamroller something is wrong!?

I think the output is right?

so why I can’t pass the challenge

steamrollArray([[["a"]], [["b"]]]) should return ["a", "b"] .

steamrollArray([1, [2], [3, [[4]]]]) should return [1, 2, 3, 4] .

steamrollArray([1, [], [3, [[4]]]]) should return [1, 3, 4] .

steamrollArray([1, {}, [3, [[4]]]]) should return [1, {}, 3, 4] .


let Narr=[];
let a,b;

function isItArray(arr){
return arr.constructor === Array;
}

function thatNum(arr2){
  for(let i=0;i<arr2.length;i++){
    if(isItArray(arr2[i])){
      thatNum(arr2[i]);
    } else {
    Narr.push(arr2[i]);
   }
  }
}


/**************************/

 function steamrollArray(arr) {
  // I'm a steamroller, baby
  
for(let i=0;i<arr.length;i++){
  if(isItArray(arr[i])){
     thatNum(arr[i]);
     
  } else {
    Narr.push(arr[i]);
  }
}

for(let i=0;i<Narr.length;i++){
  console.log(Narr[i]);
}


  return Narr;
}

steamrollArray([[["a"]], [["b"]]]);

Change all your console log to

console.log(JSON.stringify( /* here the thing you want to print to the console */ ))

And you will see better if your array is multidimensional or not

I tried it the output is right 100%!

Oh, you have a global variable… that’s gonna be updated by all test calls - don’t use global variables