在下面的代码中,"This"关键字引用了"myName"对象.为什么sole.log中的"this"不引用"Window"对象,因为它实际上是"window.console.log"?
class Name {
constructor(firstName) {
this.firstName = firstName;
}
superGreet() {
console.log('I am', this.firstName);
}
}
let myName = new Name("Jay");
myName.superGreet();