minor fixes
This commit is contained in:
parent
3fbbcd1559
commit
d3b38c2837
1 changed files with 3 additions and 1 deletions
|
@ -160,7 +160,9 @@ let user = {
|
||||||
let admin = user;
|
let admin = user;
|
||||||
user = null; // overwrite to make things obvious
|
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.
|
If we used `this.name` instead of `user.name` inside the `alert`, then the code would work.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue