JS Tip 🧞♂️ #0
You can remove all “falsy” values from an Array by filtering for Boolean.
const fruits = [
'Apple',
null,
'PineApple',
undefined,
'CustardApple',
undefined,
'GoldenApple'
]
const filteredFruits = fruits.filter(Boolean)
filteredFruits /...
nsblog.hashnode.dev1 min read
ChipBia Chang
manager
I am very impressed with your articles, your content is very engaging and easy to understand. I have read many other websites but I still like your site.