Array.prototype.forEach = function(callback, context) {
for (var i = 0; i < this.length; i++) {
callback.call(context || null, this[i], i, this);
}
};
["a", "b", "c"].forEach(function(value, index, array) {
assert(value,
"Is in position " + index + " out of " +
(array.length - 1));
});
ここで が使用される理由がよくわかりませんnull。invoke を使用するとforeach、contextパラメーターが欠落している場合、それはnull?に置き換えられると思います。callback.call(context || null, this[i], i, this)実行しますか?誰かが私のためにこれを説明できますか?