From 7487ce9ebe29dd321283130a36bf6d6442a9f0e6 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Tue, 20 Oct 2020 11:11:31 +0300 Subject: [PATCH] Update article.md --- 1-js/04-object-basics/07-optional-chaining/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/04-object-basics/07-optional-chaining/article.md b/1-js/04-object-basics/07-optional-chaining/article.md index 8d473438..29eddcd8 100644 --- a/1-js/04-object-basics/07-optional-chaining/article.md +++ b/1-js/04-object-basics/07-optional-chaining/article.md @@ -23,7 +23,7 @@ alert(user.address.street); // Error! 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. -That said, in many practical cases we'd prefer to get `undefined` instead of an error here (meaning "no street"). +In many practical cases we'd prefer to get `undefined` instead of an error here (meaning "no street"). ...And another example. In the web development, we may need the information about an element on the page. We can find this element using a special method call, such as `document.querySelector('.elem')`, and it either returns an object or `null` when there's no such element.