DEV Community

Discussion on: JavaScript shorthand tips and tricks

Collapse
 
jonrandy profile image
Jon Randy 🎖️

If you're code-golfing, removing falsey values can be achieved with:

arr.filter(x=>x)
Enter fullscreen mode Exit fullscreen mode