diff options
| author | Irvin <irvinfly@gmail.com> | 2022-02-16 02:02:49 +0800 |
|---|---|---|
| committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
| commit | 01b0e12ba27b5069248fd09235e9a7143915ee30 (patch) | |
| tree | 0e9edf538dc3fa3331e1dbb79239b58186765f86 /files/zh-cn/web/javascript/reference/errors/not_defined | |
| parent | 6ca84f1794af830ada9736d7289ce29aabb04ca3 (diff) | |
| download | translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.gz translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.bz2 translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.zip | |
remove `notranslate` class in zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/errors/not_defined')
| -rw-r--r-- | files/zh-cn/web/javascript/reference/errors/not_defined/index.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/errors/not_defined/index.html b/files/zh-cn/web/javascript/reference/errors/not_defined/index.html index a092f394ec..cc5fadb2a8 100644 --- a/files/zh-cn/web/javascript/reference/errors/not_defined/index.html +++ b/files/zh-cn/web/javascript/reference/errors/not_defined/index.html @@ -7,7 +7,7 @@ translation_of: Web/JavaScript/Reference/Errors/Not_defined <h2 id="错误信息">错误信息</h2> -<pre class="syntaxbox notranslate">ReferenceError: "x" is not defined +<pre class="syntaxbox">ReferenceError: "x" is not defined </pre> <h2 id="错误类型">错误类型</h2> @@ -26,19 +26,19 @@ translation_of: Web/JavaScript/Reference/Errors/Not_defined <h3 id="变量没有被声明">变量没有被声明</h3> -<pre class="brush: js example-bad notranslate">foo.substring(1); // ReferenceError: foo is not defined +<pre class="brush: js example-bad">foo.substring(1); // ReferenceError: foo is not defined </pre> <p>“foo” 变量没有在任何地方被声明。它需要是某种字符串,这样 {{jsxref("String.prototype.substring()")}} 方法才可以正常工作。</p> -<pre class="brush: js example-good notranslate">var foo = 'bar'; +<pre class="brush: js example-good">var foo = 'bar'; foo.substring(1); // "ar"</pre> <h3 id="错误的作用域">错误的作用域</h3> <p>变量必须是在它当前的执行环境中可用的。在一个函数(<a href="/en-US/docs/Web/JavaScript/Reference/Functions">function</a>)中定义的变量不能从这个函数外部的任何地方访问,因为这个变量的作用域仅在这个函数的内部。</p> -<pre class="brush: js example-bad notranslate">function numbers () { +<pre class="brush: js example-bad">function numbers () { var num1 = 2, num2 = 3; return num1 + num2; @@ -48,7 +48,7 @@ console.log(num1); // ReferenceError num1 is not defined.</pre> <p>然而,一个函数可用使用在它所被定义的作用域中的所有变量。换句话说,当一个函数被定义在全局作用域的时候,它可以访问所有在全局作用域中定义的变量。</p> -<pre class="brush: js example-good notranslate">var num1 = 2, +<pre class="brush: js example-good">var num1 = 2, num2 = 3; function numbers () { |
