Steamroller challange

This is the Steamroller challange problem solution. Every time answer is showing correct but FCC doesn’t take it. What is the reason?

**The Code is:

function steamrollArray(arr) {
  // I'm a steamroller, baby
  
  flattenArr(arr);
  console.log(newArr);
  return newArr;
}

function flattenArr(val) {
  for (var i = 0; i < val.length; i++) {
    if (!Array.isArray(val[i])) {
      newArr.push(val[i]);
    }
    else {
      flattenArr(val[i]);
    }
  }
}

var newArr = [];

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






* browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36```.

**Link to the challenge:**
https://www.freecodecamp.org/challenges/steamroller

Thank you. It works :smiley: