Question: what is the main difference between a .map() loop and a foreach loop?
Answer: 1. The returning value. The first difference between map() and forEach() is the returning value. The forEach() method returns undefined and map() returns a new array with the transformed elements.