On page 189 you recommend using .bind()
to set this
for the context of the .forEach()
method.
Is there an advantage to this versus simply passing this
as an argument to .foreach()
like this?
customerIdArray.forEach(function(id) {
console.log(this.db.get(id));
}, this);
It seems to work this way.