[Leetcode] JS 30 Filter Elements from Arrays
Question 2634
truthy values
Question
Given an integer array arr and a filtering function fn, return a filtered array filteredArr.
The fn function takes one or two arguments:
* arr[i] - number from the arr
* i - index of arr[i]
filteredArr should only contain the elements from the arr