I am getting results in other inputs but in this input its not working..........Can anyone help me please?

Tell us what’s happening:

Your code so far


function filteredArray(arr, elem) {
  let newArr = [];
  // change code below this line
  for(let i = 0; i < arr.length;i++){
    arr[i].forEach(function(item){
      if(item == elem){
        arr.splice(i,1);
      }
    })
  }
  newArr = [...arr];
  // change code above this line
  return newArr;
}

// change code here to test different cases:
console.log(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3));

please post the link or the exact name of the challenge

plus which tests you are failing