diff options
author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:04 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | 7c2556fe79c44d7c31108b8c8b048d2b7704a95e (patch) | |
tree | cb64f8749da725612d3dc9cf95943d0fc40add79 /files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html | |
parent | ba64b95982c1b53696644a033accf800a4e82c09 (diff) | |
download | translated-content-7c2556fe79c44d7c31108b8c8b048d2b7704a95e.tar.gz translated-content-7c2556fe79c44d7c31108b8c8b048d2b7704a95e.tar.bz2 translated-content-7c2556fe79c44d7c31108b8c8b048d2b7704a95e.zip |
remove span tag in zh-TW
Diffstat (limited to 'files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html')
-rw-r--r-- | files/zh-tw/web/javascript/reference/operators/optional_chaining/index.html | 2 |
1 files changed, 1 insertions, 1 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 945ec32efc..715161eca9 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 @@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Operators/Optional_chaining <div></div> -<p><strong>可選串連</strong>運算子 <strong><code>?.</code></strong> 允許進行深層次的物件值存取,而無需透過明確的物件值串連驗證。<span class="seoSummary"><code>?.</code> 運算子的操作與 <code>.</code> 屬性存取運算子相似,後者會在參照到 <a href="/zh-TW/docs/Glossary/nullish">nullish</a> ({{JSxRef("null")}} or {{JSxRef("undefined")}}) 的值時出現錯誤,而前者可選串連則回傳 <code>undefined</code> 。</span> 當需要存取一個函數,而這函數並不存在時,則會回傳 <code>undefined</code> 。</p> +<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> <p>當有機會存在參照不存在的時候,可選串連可以提供更簡短的表述式來進行串連性的屬性存取。這有助於在無法保證物件屬性為必要存在的狀況下,進行物件內容的探索。</p> |