Javascript Array methods such as forEach have a thisArg parameter, which is used as the context for invoking the callback:
forEach
thisArg
array.fo
You can always use this method :
array.reduce(callback.bind(context), initialValue);
... in order to attach a specific context to the callback function.