Thinking in Array.reduce()

added by JavaScript Kicks
7/20/2018 6:10:25 PM

559 Views

I would like to filter an array of items by using the map() function. The problem is that filtered out items still uses space in the array and I would like to completely wipe them out. Any idea? If you want to perform map() and filter() in a single loop, the way to do that would be reduce().


0 comments