aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/undefined/index.html
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:07 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commit563ca0a35e98678e2b7d5f154f31f496851e8d60 (patch)
tree7c99e7e037128217eca2080df671a742076c615b /files/zh-cn/web/javascript/reference/global_objects/undefined/index.html
parentd7b2995cabe8d85a1827aa18bc270bdf739f3d13 (diff)
downloadtranslated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.tar.gz
translated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.tar.bz2
translated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.zip
remove code tag inside pre tag for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/undefined/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/undefined/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/undefined/index.html b/files/zh-cn/web/javascript/reference/global_objects/undefined/index.html
index 20ff8d53a7..2748581673 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/undefined/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/undefined/index.html
@@ -101,9 +101,9 @@ if(y === undefined) { // ReferenceError: y is not defined
<p>但是,技术方面看来这样的使用方法应该被避免。JavaScript是一个静态作用域语言,所以,一个变量是否被声明可以通过看它是否在一个封闭的上下文中被声明。唯一的例外是全局作用域,但是全局作用域是被绑定在全局对象上的,所以要检查一个变量是否在全局上下文中存在可以通过检查全局对象上是否存在这个属性(比如使用{{jsxref("Operators/in", "in")}}操作符)。</p>
-<pre class="brush: js line-numbers language-js"><code class="language-js">if ('x' in window) {
+<pre class="brush: js line-numbers language-js">if ('x' in window) {
// 只有x被全局性的定义 才会这行这些语句
-}</code></pre>
+}</pre>
<h3 id="Void操作符和undefined">Void操作符和undefined</h3>