minor fixes

This commit is contained in:
Ilya Kantor 2020-10-11 17:14:36 +03:00
parent 1273ae44e3
commit e7953a4759

View file

@ -160,7 +160,7 @@ let user = {
let admin = user;
user = null; // overwrite to make things obvious
admin.sayHi(); // Whoops! inside sayHi(), the old name is used! error!
admin.sayHi(); // TypeError: Cannot read property 'name' of null!
```
If we used `this.name` instead of `user.name` inside the `alert`, then the code would work.