When I first started JavaScript, I always got confused between forEach(), map(), and filter(). They all loop through an array, but they don't do the same thing.
Here's the easiest way to remember them.
1. forEach() – Just Visits Every Element
You can imagine as if forEach() is saying:
"Go through every element and perform some work."






