1

I know that lexical enviroment (LE) and context are different things. But is it correct that this.name has the same LE as user in this case (global)?

var user = {
  name: 'Василий',

  sayHi: function() {
    alert( this.name );
  }
};

user.sayHi(); 
Ekaterina
  • 976
  • 3
  • 9
  • 25

0 Answers0