箭头函数的情况:
箭头函数没有自己的this,继承外层上下文绑定的this;
let obj = {
age: 20,
info: function() {
return () => {
console.log(this.age);
}
}
}
let person = { age: 28 };
let info = obj.info();
info(); //20
let info2 = obj.info.call(person);
info2(); //28