How can I filter an array using the for
structure?
The code is this:
const numeros = [1,2,3,4,5,55,190,355,747,1000,125];
I need to filter the numbers under 10.
I used it this way, but I was asked to create one using the for
structure and I can not get out of 0.
const numeros = [1,2,3,4,5,55,190,355,747,1000,125];
const filterOne = x => x < 10;
const filterTwo = numeros.filter(filterOne);
console.log(filterTwo);