There is a subtle difference in which elements will be looped over between map and forEach. If the element in the array is undefined, it will not be invoked in map, but it will be invoked on forEach.
Obviously this distinction does not apply in the case of querySelectorAll, which will never return undefined in its results.
So the only difference between them is that of what the function returns. forEach has no return value. map executes a function on each member of the array and returns the results. So, for instance, you could do this:
var values = [].map.call(document.querySelectorAll('input'), function(el) {
return el.value;
});
This will return an array containing the value of every element selected by querySelectorAll('input').
So you should use map when that's what you want; otherwise, use forEach.
NB that Array.prototype.every and Array.prototype.some also exist; there may be times when they would be more appropriate.