aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/operators
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
commitc40612041809fe289aba58aefa170bbe784aba1f (patch)
tree8ca89b071d04afcf7abd6d9a04d0765a041d9c8a /files/zh-cn/web/javascript/reference/operators
parent12a899ab8540bc84f56a0dc6491be80a48499d49 (diff)
downloadtranslated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.gz
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.bz2
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.zip
remove name attribute for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/operators')
-rw-r--r--files/zh-cn/web/javascript/reference/operators/comma_operator/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/operators/delete/index.html10
-rw-r--r--files/zh-cn/web/javascript/reference/operators/function/index.html8
-rw-r--r--files/zh-cn/web/javascript/reference/operators/grouping/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/operators/in/index.html12
-rw-r--r--files/zh-cn/web/javascript/reference/operators/instanceof/index.html14
-rw-r--r--files/zh-cn/web/javascript/reference/operators/remainder/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/operators/typeof/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/operators/void/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/operators/yield/index.html10
-rw-r--r--files/zh-cn/web/javascript/reference/operators/yield_star_/index.html10
11 files changed, 37 insertions, 37 deletions
diff --git a/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html b/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html
index 47f369410f..cc7b2f83a8 100644
--- a/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html
@@ -77,7 +77,7 @@ translation_of: Web/JavaScript/Reference/Operators/Comma_Operator
<p>{{Compat("javascript.operators.comma")}}</p>
-<h2 id="See_also" name="See_also">参见</h2>
+<h2 id="See_also">参见</h2>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for">for loop</a></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/delete/index.html b/files/zh-cn/web/javascript/reference/operators/delete/index.html
index ce9d2120a4..1a088c94a3 100644
--- a/files/zh-cn/web/javascript/reference/operators/delete/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/delete/index.html
@@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Operators/delete
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox">delete <em>expression</em>
</pre>
@@ -29,7 +29,7 @@ translation_of: Web/JavaScript/Reference/Operators/delete
delete <em>object</em>['<em>property</em>']
</pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>object</code></dt>
@@ -49,7 +49,7 @@ delete <em>object</em>['<em>property</em>']
<p>在<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode">严格模式</a>下,如果是属性是一个自己不可配置的属性,会抛出{{jsxref("TypeError")}}。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>与通常的看法不同,<code>delete</code>操作符与直接释放内存<strong>无关</strong>。内存管理 通过断开引用来间接完成的,查看<a href="/zh-CN/docs/Web/JavaScript/Memory_Management">内存管理</a>页可了解详情。</p>
@@ -234,7 +234,7 @@ delete Foo.prototype.bar; //true
console.log(foo.bar); //undefined
</pre>
-<h3 id="Deleting_array_elements" name="Deleting_array_elements">删除数组元素</h3>
+<h3 id="Deleting_array_elements">删除数组元素</h3>
<p>当你删除一个数组元素时,数组的长度不受影响。即便你删除了数组的最后一个元素也是如此。</p>
@@ -289,7 +289,7 @@ console.log(trees); // ["redwood", "bay", "cedar", "maple"]
<p>如果您想在跨浏览器的环境中使用有序的关联数组,请使用{{jsxref("Map")}}对象(如果有),或使用两个单独的数组来模拟(一个用于键,另一个用于 值),或者建立一个由单一属性的对象组成的数组等。</p>
-<h2 id="See_also" name="See_also">参见</h2>
+<h2 id="See_also">参见</h2>
<ul>
<li><a href="http://perfectionkills.com/understanding-delete/">深入分析 delete</a></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/function/index.html b/files/zh-cn/web/javascript/reference/operators/function/index.html
index fa7ce6bd01..c3c9bd85ea 100644
--- a/files/zh-cn/web/javascript/reference/operators/function/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/function/index.html
@@ -15,7 +15,7 @@ translation_of: Web/JavaScript/Reference/Operators/function
<p>你也可以使用 <a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Function" title="The Function constructor creates a new Function object. In JavaScript every function is actually a Function object."><code>Function</code></a> 构造函数和一个<a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/function">函数声明</a>来定义函数。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox">let function_expression = function [<em>name</em>]([<em>param1</em>[, <em>param2[</em>, ..., <em>paramN</em>]]]) {
<em>statements</em>
@@ -23,7 +23,7 @@ translation_of: Web/JavaScript/Reference/Operators/function
<p>从 <a href="https://developer.mozilla.org/zh-CN/docs/">ES2015</a>开始,你也可以使用<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions">箭头函数</a> 。</p>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>name</code></dt>
@@ -34,7 +34,7 @@ translation_of: Web/JavaScript/Reference/Operators/function
<dd>构成函数体的语句。</dd>
</dl>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>函数表达式(function expression)非常类似于函数声明(function statement)(详情查看<a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/function">函数声明</a>),并且两者拥有几乎相同的语法。函数表达式与函数声明的最主要区别是函数名称(<em>function name</em>),在函数表达式中可省略它,从而创建匿名函数(<em>anonymous</em> functions)。一个函数表达式可以被用作一个IIFE(Immediately Invoked Function Expression,即时调用的函数表达式),它一旦定义就运行。更多信息请查看<a href="/zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope">函数</a>。</p>
@@ -170,7 +170,7 @@ console.log(bar === baz); // false (errors because baz == undefined)</code>
</table>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Functions_and_function_scope", "Functions and function scope")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/operators/grouping/index.html b/files/zh-cn/web/javascript/reference/operators/grouping/index.html
index 77e572a4ce..87b135b208 100644
--- a/files/zh-cn/web/javascript/reference/operators/grouping/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/grouping/index.html
@@ -80,7 +80,7 @@ a * c + b * c // 9
<p>{{Compat("javascript.operators.grouping")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">运算符优先级</a></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/in/index.html b/files/zh-cn/web/javascript/reference/operators/in/index.html
index c84cdadf5a..8420c0d14b 100644
--- a/files/zh-cn/web/javascript/reference/operators/in/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/in/index.html
@@ -15,11 +15,11 @@ translation_of: Web/JavaScript/Reference/Operators/in
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><em>prop</em> in <em>object</em></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>prop</code></dt>
@@ -31,7 +31,7 @@ translation_of: Web/JavaScript/Reference/Operators/in
<dd>检查它(或其原型链)是否包含具有指定名称的属性的对象。</dd>
</dl>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>下面的例子演示了一些 <code>in</code> 运算符的用法。</p>
@@ -64,7 +64,7 @@ var color2 = "coral";
"length" in color2 // 报错(color2不是对象)
</pre>
-<h3 id="Using_in_with_deleted_or_undefined_properties" name="Using_in_with_deleted_or_undefined_properties">对被删除或值为 undefined 的属性使用<code>in</code></h3>
+<h3 id="Using_in_with_deleted_or_undefined_properties">对被删除或值为 undefined 的属性使用<code>in</code></h3>
<p>如果你使用 <code><a href="/zh-CN/docs/JavaScript/Reference/Operators/delete" title="zh-CN/docs/JavaScript/Reference/Operators/Special/delete">delete</a></code> 运算符删除了一个属性,则 <code>in</code> 运算符对所删除属性返回 <code>false</code>。</p>
@@ -89,7 +89,7 @@ trees[3] = undefined;
3 in trees; // 返回true
</pre>
-<h3 id="Inherited_properties" name="Inherited_properties">继承属性</h3>
+<h3 id="Inherited_properties">继承属性</h3>
<p>如果一个属性是从原型链上继承来的,<code>in</code> 运算符也会返回 <code>true</code>。</p>
@@ -132,7 +132,7 @@ trees[3] = undefined;
<p>{{Compat("javascript.operators.in")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><code><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for...in">for...in</a></code></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/instanceof/index.html b/files/zh-cn/web/javascript/reference/operators/instanceof/index.html
index 9bc5622462..f8c5807b3c 100644
--- a/files/zh-cn/web/javascript/reference/operators/instanceof/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/instanceof/index.html
@@ -18,11 +18,11 @@ translation_of: Web/JavaScript/Reference/Operators/instanceof
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre><code><em>object</em> instanceof <em>constructor</em></code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>object</code></dt>
@@ -34,7 +34,7 @@ translation_of: Web/JavaScript/Reference/Operators/instanceof
<dd>某个构造函数</dd>
</dl>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>instanceof</code> 运算符用来检测 <code>constructor.prototype </code>是否存在于参数 <code>object</code> 的原型链上。</p>
@@ -79,9 +79,9 @@ o3 instanceof C; // true 因为 C.prototype 现在在 o3 的原型链上
<div class="note"><strong>Mozilla开发者注意:</strong><br>
在代码中使用 XPCOM <code>instanceof </code>有特殊影响: 如果查询接口成功执行后,<code>obj instanceof </code><em><code>xpcomInterface</code></em> (e.g. <code>Components.interfaces.nsIFile</code>) 调用<code>obj.QueryInterface(<em>xpcomInterface</em>)</code> 并且返回 <code>true</code> 。这种调用的副作用是在一次成功的 <code>instanceof</code> 测试后,你可以在 <code>obj</code> 上使用<code>xpcomInterface</code> 的属性。这与标准的 <code>JavaScript</code> 全局变量不同,即使 <code>obj</code> 来自不同的作用域,<code>obj instanceof xpcomInterface</code> 也可以按预期产生作用。</div>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Demonstrating_that_String_and_Date_are_of_type_Object" name="Example:_Demonstrating_that_String_and_Date_are_of_type_Object">演示 <code>String</code> 对象和 <code>Date</code> 对象都属于 <code>Object</code> 类型和一些特殊情况</h3>
+<h3 id="Example_Demonstrating_that_String_and_Date_are_of_type_Object">演示 <code>String</code> 对象和 <code>Date</code> 对象都属于 <code>Object</code> 类型和一些特殊情况</h3>
<p>下面的代码使用了 <code>instanceof</code> 来证明:<code>String</code> 和 <code>Date</code> 对象同时也属于<code>Object</code> 类型(他们是由 <code>Object</code> 类派生出来的)。</p>
@@ -109,7 +109,7 @@ myDate instanceof Date; // 返回 true
myDate instanceof Object; // 返回 true
myDate instanceof String; // 返回 false</pre>
-<h3 id="Example_Demonstrating_that_mycar_is_of_type_Car_and_type_Object" name="Example:_Demonstrating_that_mycar_is_of_type_Car_and_type_Object">演示 <code>mycar</code> 属于 <code>Car</code> 类型的同时又属于 <code>Object</code> 类型</h3>
+<h3 id="Example_Demonstrating_that_mycar_is_of_type_Car_and_type_Object">演示 <code>mycar</code> 属于 <code>Car</code> 类型的同时又属于 <code>Object</code> 类型</h3>
<p>下面的代码创建了一个类型 <code>Car</code>,以及该类型的对象实例 <code>mycar</code>. <code>instanceof</code> 运算符表明了这个 <code>mycar</code> 对象既属于 <code>Car</code> 类型,又属于 <code>Object</code> 类型。</p>
@@ -174,7 +174,7 @@ var b = mycar instanceof Object; // 返回 true
<p>{{Compat("javascript.operators.instanceof")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a href="/zh-CN/docs/JavaScript/Reference/Operators/typeof" title="/zh-CN/docs/JavaScript/Reference/Operators/typeof">typeof</a></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/remainder/index.html b/files/zh-cn/web/javascript/reference/operators/remainder/index.html
index a2d1e19fa6..6a21bea368 100644
--- a/files/zh-cn/web/javascript/reference/operators/remainder/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/remainder/index.html
@@ -64,7 +64,7 @@ original_slug: Web/JavaScript/Reference/Operators/取余
<p>{{Compat("javascript.operators.remainder")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
</ul>
diff --git a/files/zh-cn/web/javascript/reference/operators/typeof/index.html b/files/zh-cn/web/javascript/reference/operators/typeof/index.html
index d050bdb8ef..ae77ab6261 100644
--- a/files/zh-cn/web/javascript/reference/operators/typeof/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/typeof/index.html
@@ -270,7 +270,7 @@ class newClass{};</pre>
<div class="brush:js language-js line-number"></div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof">instanceof</a></code></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/void/index.html b/files/zh-cn/web/javascript/reference/operators/void/index.html
index 9cf6d19c4b..db690ddb26 100644
--- a/files/zh-cn/web/javascript/reference/operators/void/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/void/index.html
@@ -103,7 +103,7 @@ translation_of: Web/JavaScript/Reference/Operators/void
<p>{{Compat("javascript.operators.void")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><code><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></code></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/yield/index.html b/files/zh-cn/web/javascript/reference/operators/yield/index.html
index a0a3b92756..f34061ded0 100644
--- a/files/zh-cn/web/javascript/reference/operators/yield/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/yield/index.html
@@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Operators/yield
<p><code>yield</code> 关键字用来暂停和恢复一个生成器函数(({{jsxref("Statements/function*", "function*")}} 或<a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/Legacy_generator_function">遗留的生成器函数</a>)。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox">[<em>rv</em>] = <strong>yield</strong> [<em>expression</em>];</pre>
@@ -45,7 +45,7 @@ translation_of: Web/JavaScript/Reference/Operators/yield
<p>在生成器的代码路径中的<code>yield</code>运算符,以及通过将其传递给{{jsxref("Generator.prototype.next()")}}指定新的起始值的能力之间,生成器提供了强大的控制力。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
<p>以下代码是一个生成器函数的声明。</p>
@@ -64,7 +64,7 @@ console.log(appleStore.next()); // { value: 7, done: false }
console.log(appleStore.next()); // { value: 5, done: false }
console.log(appleStore.next()); // { value: undefined, done: true }</pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<thead>
@@ -88,11 +88,11 @@ console.log(appleStore.next()); // { value: undefined, done: true }</pre>
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
<p>{{Compat("javascript.operators.yield")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol">The Iterator protocol</a></li>
diff --git a/files/zh-cn/web/javascript/reference/operators/yield_star_/index.html b/files/zh-cn/web/javascript/reference/operators/yield_star_/index.html
index bd1e86393a..18859b1657 100644
--- a/files/zh-cn/web/javascript/reference/operators/yield_star_/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/yield_star_/index.html
@@ -15,7 +15,7 @@ translation_of: Web/JavaScript/Reference/Operators/yield*
<p> <strong><code>yield*</code> 表达式</strong>用于委托给另一个{{jsxref("Statements/function*", "generator")}} 或可迭代对象。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"> yield* [[expression]];</pre>
@@ -30,7 +30,7 @@ translation_of: Web/JavaScript/Reference/Operators/yield*
<p><code>yield*</code> 表达式本身的值是当迭代器关闭时返回的值(即<code>done</code>为<code>true</code>时)。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
<h3 id="委托给其他生成器">委托给其他生成器</h3>
@@ -105,7 +105,7 @@ console.log(iterator.next()); // { value: undefined, done: true },
console.log(result); // "foo"
</pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<thead>
@@ -129,7 +129,7 @@ console.log(result); // "foo"
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容</h2>
+<h2 id="Browser_compatibility">浏览器兼容</h2>
<p>{{Compat("javascript.operators.yield_star")}}</p>
@@ -150,7 +150,7 @@ console.log(result); // "foo"
</li>
</ul>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a href="/zh-CN/docs/Web/JavaScript/Guide/The_Iterator_protocol">迭代器协议</a></li>