programming is hard, but async programming is harder. Don't listen to people tell you about "callback hell". They are only in the most outer circles of async programming hell. As you get deeper into async systems, you'll see that what makes it hard is that there are many possible orderings for events to occur in. How many? well if the time taken for N processes is independant, then there are N! (factorial) possible orderings!
but what if we could at least be precise about what sort of orderings are expected?
so, forEach is a function that takes a function and calls it maybe many times.
Array.prototype.forEach = function (<many> fn) {
var l = this.length
for(var i = 0; i < l; i++)