99
rated 0 times
[
101]
[
2]
/ answers: 1 / hits: 45538
/ 11 Years ago, thu, october 31, 2013, 12:00:00
I was wondering what the 'this' value (or invocation context) is of the forEach callback function. This code doesn't seem to work:
var jow = [5, 10, 45, 67];
jow.forEach(function(v, i, a){
this[i] = v + 1;
});
alert(jow);
Thx for explaining it to me.
More From » function