#Creating a filter function without using .filter
6 messages · Page 1 of 1 (latest)
You're on the right track but went a little off course when you process the result inside the for...
You know that the callback has to return a boolean right? So result will be a boolean... what do you want to do with the current array item (arr[i]) if the result is true? What do you want to do if it's false?
would i need to create a if else statement?
I would say so