They are not one and the same. Let me explain the difference.
forEach
: This iterates over a list and applies some operation with side effects to each list member (example: saving every list item to the database)
map
: This iterates over a list, transforms each member of that list, and returns another list of the same size with the transformed members (example: transforming list of strings to uppercase). It does not mutate the array on which it is called (although if passed a callback function, it may do so).
References