0

次の例を見てください。

function aaa () {
    console.dir(this)
}

function bbb () {}

aaa.apply(undefined, [1,2,3]) // this in aaa is `window` object
aaa.apply(bbb, [1,2,3]) // this in aaa is `bbb` function

強制しようとしているのに、最初に適用する場合にthis設定されるのはなぜですか?windowundefined

4

2 に答える 2