Having trouble with this, anyone that could give me a hint of what misstake i have done???
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.
Did this, it should be right, but it didnt go through why?
Solved the issue! thx for the help!
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?