Filter through function
We have a built-in method
arr.filter(f)
for arrays. It filters all elements through
the function f. If it returns
true, then that element is
returned in the resulting array.
Make a set of “ready to use” filters:
-
inBetween(a, b)– betweenaandbor equal to them (inclusively). -
inArray([...])– in the given array.