Arrays are essential data structures used in JavaScript. It lets you store sequences of values. With array methods, you can transform and manipulate values in your arrays. Sometimes the data you get back from different data sources might not be consi...
ridwanabiola.hashnode.dev3 min read
Good solution!
You can do the same by relying on the truthiness of a value too, e.g. myArray.filter(n => n);. Something to be careful of is that 0 is considered a falsy value.
Shubh Sharma
Self-taught Dev | Full-stack JavaScript Developer
Good one 🔥