From 0bdf17e74bbfc8f907741b389d75f31e4f0e1736 Mon Sep 17 00:00:00 2001 From: satyam bansal Date: Sun, 1 Nov 2020 17:59:28 +0530 Subject: [PATCH] Fix Optional chaining doc --- 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 a20ad448..97fab12e 100644 --- a/1-js/04-object-basics/07-optional-chaining/article.md +++ b/1-js/04-object-basics/07-optional-chaining/article.md @@ -80,7 +80,7 @@ The optional chaining `?.` stops the evaluation if the part before `?.` is `unde In other words, `value?.prop`: - is the same as `value.prop` if `value` exists, -- otherwise (when `value` is `undefined/null`) it returns that `value`. +- otherwise (when `value` is `undefined/null`) it returns `undefined`. Here's the safe way to access `user.address.street` using `?.`: