Adding False Functionality to Filtering
Learn how to extend a generic filter function to explicitly sort by truthy or falsy values.
We'll cover the following
So far, our function explicitly filters on properties that return a truthy value. But, what if we want the opposite behavior, specifically filtering for properties that are falsy
? For example, we might be maintaining a data type similar to IWidget
and want to find widgets that don’t have a title or description.
Get hands-on with 1200+ tech skills courses.