map() and forEach() in Javascript

The main difference between map and forEach is that¬†the map method returns a new array by applying the callback function on each element of an array, while the forEach method doesn’t return anything.¬†