Thank you for the post. 🙂
On (2) filter number, I've just modified as following
console.log(filterNumbers([1, true, 0, "2", null, undefined, " ", NaN, Number.POSITIVE_INFINITY, 66, "ab1", false])) // just added true, 0, null, undefined
The output is the following.
[1, 0, "2", null, Infinity, 66]
.
It might be better to add null checking on filtering. :)
if (isNaN(value) || isBoolean(value) || isEmptyString(value) || value === null) { -> result [1, 0, "2", Infinity, 66]
I continue reading 3)... 🍣
Thank you.
Cool!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
Thank you for the post. 🙂
On (2) filter number,
I've just modified as following
The output is the following.
.
It might be better to add null checking on filtering. :)
I continue reading 3)... 🍣
Thank you.
Cool!