This
Function Invocation Pattern
function foo() {
console.log(this.a);
}
var a = 2;
foo(); // 2Method Invocation Pattern
Constructor Pattern
Apply Pattern
严格模式
优先级
Apply Pattern > Method Invocation Pattern
Constructor Pattern > Apply Pattern
结论
记忆
箭头函数的this
题目
最后更新于