In the following code, the “this” keyword references the “myName” object. Why doesn’t the “this” in console.log reference the “window” object, since it is really “window.console.log”?
class Name {
constructor(firstName) {
this.firstName = firstName;
}
superGreet() {
console.log('I am', this.firstName);
}
}
let myName = new Name("Jay");
myName.superGreet();