this 关键字
绑定规则
默认绑定
function foo() {
console.log(this);
}
foo(); // window
function bar() {
"use strict";
console.log(this);
}
bar(); // undefined隐式绑定
显式绑定
new 绑定
特殊case
被忽略的this
间接引用
箭头函数
Last updated