Oh, sure, I could have used that. I’d probably prefer to just use an array filter though, as I do later in the post, as it will only filter the things I want and don’t incur the overhead of requiring a library like (or even just a function from) lodash.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Phil,
would not have been the case to use lodash for undefined and null ?
This would have worked as well, therefore you might not need lodash.
Hi Stefano, not sure what you mean there. Could you explain more?
lodash.com/docs/4.17.15#compact
Wow. Using lodash for that. Wow. :)
Oh, sure, I could have used that. I’d probably prefer to just use an array
filter
though, as I do later in the post, as it will only filter the things I want and don’t incur the overhead of requiring a library like (or even just a function from) lodash.