Tell us what’s happening:
Describe your issue in detail here.
Hi,
I used filter and map to solve this question. However, when looking that the solution being provided, I still have a few questions in mind. Please offer some insights!
Now, the reduce method is making an array, so the return value from the callback must be an array. Push modifies the array, but it does not return the modified array. We could rearrange this again if you want to use push
Lots of ways to write equivalent logic so long as you understand how high order methods work and what each built in JS method does. But if any of this isn’t quite clicking, please ask more questions!