minor fixes

This commit is contained in:
Ilya Kantor 2020-10-11 17:16:04 +03:00
parent 3fbbcd1559
commit d3b38c2837

View file

@ -160,7 +160,9 @@ let user = {
let admin = user;
user = null; // overwrite to make things obvious
admin.sayHi(); // TypeError: Cannot read property 'name' of null!
*!*
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.