aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/javascript/reference/global_objects/undefined
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:08 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitf45e9e070c93ebbd83d488bdd775987a4d75c201 (patch)
treeaacef5edaf768a188cadc46860f5b6aaa74f39ef /files/zh-tw/web/javascript/reference/global_objects/undefined
parent8ccfa93045a6c119303566370999f59a0aae3b25 (diff)
downloadtranslated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.tar.gz
translated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.tar.bz2
translated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.zip
fix yari h2m dry run errors
Diffstat (limited to 'files/zh-tw/web/javascript/reference/global_objects/undefined')
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/undefined/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html b/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html
index f352c84d71..f183c412ce 100644
--- a/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html
+++ b/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html
@@ -26,8 +26,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/undefined
<p>A variable that has not been assigned a value is of type undefined. A method or statement also returns <code>undefined</code> if the variable that is being evaluated does not have an assigned value. A function returns <code>undefined</code> if a value was not {{jsxref("Statements/return", "returned")}}.</p>
-<div class="warning">
-<p>While it is possible to use it as an {{Glossary("Identifier", "identifier")}} (variable name) in any scope other than the global scope (because <code>undefined</code> is not a {{jsxref("Reserved_Words", "reserved word")}}), doing so is a very bad idea that will make your code difficult to maintain and debug.</p>
+<div class="notecard warning">
+<p><strong>Warning:</strong> While it is possible to use it as an {{Glossary("Identifier", "identifier")}} (variable name) in any scope other than the global scope (because <code>undefined</code> is not a {{jsxref("Reserved_Words", "reserved word")}}), doing so is a very bad idea that will make your code difficult to maintain and debug.</p>
<pre class="brush: js">//DON'T DO THIS
@@ -54,8 +54,8 @@ else {
}
</pre>
-<div class="note">
-<p>備註:The strict equality operator rather than the standard equality operator must be used here, because <code>x == undefined</code> also checks whether <code>x</code> is <code>null</code>, while strict equality doesn't. <code>null</code> is not equivalent to <code>undefined</code>. See {{jsxref("Operators/Comparison_Operators", "comparison operators")}} for details.</p>
+<div class="notecard note">
+<p><strong>Note:</strong> The strict equality operator rather than the standard equality operator must be used here, because <code>x == undefined</code> also checks whether <code>x</code> is <code>null</code>, while strict equality doesn't. <code>null</code> is not equivalent to <code>undefined</code>. See {{jsxref("Operators/Comparison_Operators", "comparison operators")}} for details.</p>
</div>
<h3 id="Typeof_operator_and_undefined"><code>Typeof</code> operator and <code>undefined</code></h3>