The only difference I see in map and foreach is that map is returning an array and forEach is not. However, I don\'t even understand the last line
map
forEach
You can use map as though it were forEach.
It will do more than it has to, however.
scope can be an arbitrary object; it's by no means necessarily this.
scope
this
As for whether there are real uses for map and forEach, as well to ask if there are real uses for for or while loops.
for
while