when i check the code in the console i find the result exact but for some reason i can’t pass the test cases
Your code so far
let result = [];
function steamrollArray(arr) {
// I'm a steamroller, baby
arr.forEach(e => {
if (Array.isArray(e)) {
steamrollArray(e);
} else {
result.push(e);
}
})
return result;
}
console.log(steamrollArray([[["a"]], [["b"]]]));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller