Array.forEach is different from
filter. You may find it easier to reason about.
filter return us new, altered arrays based off of the original array.
forEach returns us
undefined. It’s used purely to do something with the items in an array, not to get a new array out of it.
Here’s an example. The following two code blocks are equivalent.