This commit is contained in:
Ilya Kantor 2017-03-28 10:55:51 +03:00
parent e76364de01
commit bc9117e70f
10 changed files with 15 additions and 15 deletions

View file

@ -157,7 +157,7 @@ let user = {
let admin = user;
user = null; // overwrite to make things obvious
admin.sayHi(); // wops! inside sayHi(), the old name is used! error!
admin.sayHi(); // Woops! inside sayHi(), the old name is used! error!
```
If we used `this.name` instead of `user.name` inside the `alert`, then the code would work.