mediumJS ES5#60

Array.filter manually

Prompt

Implement your own version of Array.prototype.filter as myFilter(arr, predicate). Keep elements whose predicate result is TRUTHY (not just === true), return a new array, and pass (element, index, array) to the predicate.

Hints

Solution

Your Code

10 min

Tests

Click Run to test your code