Update article.md

This commit is contained in:
LeviDing 2020-07-18 23:32:51 +08:00 committed by GitHub
parent ae1171069c
commit c2f8c4fb9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ If there's no variable `user` at all, then `user?.anything` triggers an error:
// ReferenceError: user is not defined
user?.address;
```
There must be `let/const/var user`. The optional chaining works only for declared variables.
There must be `let/const/var user`. The optional chaining works only for declared variables.
````
## Short-circuiting