Update article.md
This commit is contained in:
parent
d961910b6c
commit
9ad8f66e58
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ The optional chaining `?.` stops the evaluation if the part before `?.` is `unde
|
|||
**Further in this article, for brevity, we'll be saying that something "exists" if it's not `null` and not `undefined`.**
|
||||
|
||||
In other words, `value?.prop`:
|
||||
- returns `value.prop` if `value` exists (just like `value.prop`),
|
||||
- is the same as `value.prop` if `value` exists,
|
||||
- otherwise (when `value` is `undefined/null`) it returns that `value`.
|
||||
|
||||
Here's the safe way to access `user.address.street` using `?.`:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue