Trouble with Filter Arrays with filter challenge?

Trouble with Filter Arrays with filter challenge?
0

#1

Having trouble with this, anyone that could give me a hint of what misstake i have done???


#2

array is not defined.

In your code you have oldArray, array, and newArray…

try to tidy that up then console.log your answer to see where you stand.


#3

Did this, it should be right, but it didnt go through why?


#4

Solved the issue! thx for the help!


#5

You still have three different variables and it’s not necessary (and here it’s wrong).

You have an oldArray, ok.

You create a new array to store the numbers higher than 6 (or 5? I don’t know what challenge you’re doing).

Let’s call it newArray… so this newArray stores the values filtered out of oldArray, right?

So what is that variable array doing in your code?