1
how I can filter an array using the structure for
?
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 structure for
and I can’t 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);
@Valdeirpsr .
– Jota