私は配列イテレータ関数を持っています:
function applyCall(arr, fn) {
fn.call(arr[0], 0, arr[0]);
}
そしていくつかのコード
var arr1 = ['blah'];
applyCall(arr1, function (i, val) {
alert(typeof this); // object WHY??
alert(typeof val); // string
alert(typeof(this === val)) // alerts false, expecting true
});
ではなくtypeof this
インライン関数内にあるのはなぜですか?object
string
ここでjsfiddle