diff options
Diffstat (limited to 'files/zh-tw/web/javascript/reference/operators')
| -rw-r--r-- | files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html b/files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html index 7326405696..c9326cffd8 100644 --- a/files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html +++ b/files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html @@ -11,7 +11,7 @@ translation_of: Web/JavaScript/Reference/Operators/Optional_chaining --- <div>{{JSSidebar("Operators")}}</div> -<div></div> + <p><strong>可選串連</strong>運算子 <strong><code>?.</code></strong> 允許進行深層次的物件值存取,而無需透過明確的物件值串連驗證。<code>?.</code> 運算子的操作與 <code>.</code> 屬性存取運算子相似,後者會在參照到 <a href="/zh-TW/docs/Glossary/nullish">nullish</a> ({{JSxRef("null")}} or {{JSxRef("undefined")}}) 的值時出現錯誤,而前者可選串連則回傳 <code>undefined</code> 。 當需要存取一個函數,而這函數並不存在時,則會回傳 <code>undefined</code> 。</p> @@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Operators/Optional_chaining <div>{{EmbedInteractiveExample("pages/js/expressions-optionalchainingoperator.html", "taller")}}</div> -<div></div> + |
