diff options
author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:05 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | a2617e517fe48fbd0fc283e05c82e32765a3fb12 (patch) | |
tree | 70e585d4faa5306d2f7dc4428aa72ede4b00b5c4 /files/zh-tw/web/javascript/reference/global_objects/promise/finally | |
parent | d9e9adb5f80a819fe46349bcf6d1faec734b09cd (diff) | |
download | translated-content-a2617e517fe48fbd0fc283e05c82e32765a3fb12.tar.gz translated-content-a2617e517fe48fbd0fc283e05c82e32765a3fb12.tar.bz2 translated-content-a2617e517fe48fbd0fc283e05c82e32765a3fb12.zip |
remove font tag in zh-TW
Diffstat (limited to 'files/zh-tw/web/javascript/reference/global_objects/promise/finally')
-rw-r--r-- | files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html b/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html index e739dcdb0f..77adc0c6fa 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html @@ -36,11 +36,11 @@ p.finally(function() { <p><code>finally()</code> 方法非常類似於 <code>.then(onFinally, onFinally)</code> 的呼叫方式,但仍有一些差異:</p> <ul> - <li><font><font>當建立行內的函數時,可以只傳遞一次,從而避免重複宣告或為它宣告變數。</font></font></li> + <li>當建立行內的函數時,可以只傳遞一次,從而避免重複宣告或為它宣告變數。</li> <li><code>finally</code> 的回呼函數並不會接收到任何引數,因其沒有可靠的方式來確認 promise 是被 fulfilled 還是 rejected 。它的使用情境僅適用於當你<em>不關心</em> rejection 的原因或 fulfillment 的值,因此無須提供。範例: <ul> - <li><font><font>與 </font></font><code>Promise.resolve(2).then(() => {}, () => {})</code><font><font>(將被 resolved 為</font></font><code>undefined</code><font><font>)不同,</font></font><code>Promise.resolve(2).finally(() => {})</code><font><font> 將被 resolved 為</font></font><code>2</code><font><font>。</font></font></li> - <li><font><font>同樣的,與 </font></font><code>Promise.reject(3).then(() => {}, () => {})</code><font><font>(將 fulfilled 為</font></font><code>undefined</code><font><font>)不同,</font></font><code>Promise.reject(3).finally(() => {})</code><font><font> 將被 rejected 為</font></font><code>3</code><font><font>。</font></font></li> + <li>與 <code>Promise.resolve(2).then(() => {}, () => {})</code>(將被 resolved 為<code>undefined</code>)不同,<code>Promise.resolve(2).finally(() => {})</code> 將被 resolved 為<code>2</code>。</li> + <li>同樣的,與 <code>Promise.reject(3).then(() => {}, () => {})</code>(將 fulfilled 為<code>undefined</code>)不同,<code>Promise.reject(3).finally(() => {})</code> 將被 rejected 為<code>3</code>。</li> </ul> </li> </ul> |