Yes it does return the filtered array for each test case. Add console.log(newArr) before the return statement and check your browser’s console (Ctrl+Shft+J in Chrome) if you want to validate for yourself.
Using the code provided in the guide, the above test case does return an empty array. I don’t what you are looking at to determine what the returned value is, but if you write the following line before the return statement, you will see an empty array displayed in the browser’s console when the above test case executes.
What do you see in the browser’s console for this test case? Please provide a screenshot.
You are misunderstanding the challenge instructions (see below).
Modify the function, using a for loop, to return a filtered version of the passed array such that any array nested within arr containing elem has been removed.
The function is called with an array of arrays. You are supposed to return an array containing only arrays which do not have a 3 in them (for this particular test case). Every sub array has the number 3 in it, so you must remove all of the sub arrays, so you are only left with an empty array.