[SOLVED] Iterate Through All an Array's Items Using For Loops (but have a question)

In the challenge, my logic passes the test cases but what if I have the test array as :
[[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9], 34, 65], 3) which it doesn’t passes. Please help!

Solution of the challenge is :

for (let i=0; i<arr.length; i++){
if (arr[i].indexOf(elem)< 0){
newArr.push(arr[i]);
}}

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-all-an-arrays-items-using-for-loops/