Hi Chris, thanks so much for taking the time to read or respond! I thought the exact same thing — how did you end up with falsy or null values in an array anyway? When I was processing some strings using the RegExp .exec() function, which returns null, I finally found a use for this neat trick.
Personally, I find .filter() can be confusing to understand when it contains an if-else block. For me, it’s much easier to see the .filter(Boolean) // remove falsy line than to understand something spanning several lines.
Happy coding!