Skip to content

Commit 75e10e2

Browse files
authored
Update article.md
1 parent 7a67741 commit 75e10e2

File tree

1 file changed

+1
-1
lines changed
  • 1-js/04-object-basics/07-optional-chaining

1 file changed

+1
-1
lines changed

1-js/04-object-basics/07-optional-chaining/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let user = {}; // a user without "address" property
2121
alert(user.address.street); // Error!
2222
```
2323

24-
That's the expected result. JavaScript works like this. As `user.address` is `undefined`, an attempt to get `user.address.street` fails with an error.
24+
That's the expected result. JavaScript works like this. As `user.address` is `undefined`, an attempt to get `user.address.street` fails with an error.
2525

2626
In many practical cases we'd prefer to get `undefined` instead of an error here (meaning "no street").
2727

0 commit comments

Comments
 (0)