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
  • 1,642
  • 3
  • 19
  • 36

0 Answers0