aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/array
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/global_objects/array
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/global_objects/array')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/concat/index.html12
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/copywithin/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/fill/index.html8
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/find/index.html10
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/findindex/index.html12
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/indexof/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/join/index.html16
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/keys/index.html10
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html18
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/length/index.html8
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/map/index.html16
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/of/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/pop/index.html8
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/push/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/reverse/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/slice/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/some/index.html14
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/sort/index.html16
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/tosource/index.html14
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/tostring/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/unshift/index.html6
22 files changed, 100 insertions, 100 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/concat/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/concat/index.html
index b0960c35d0..dbd74c0909 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/concat/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/concat/index.html
@@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/concat
<pre class="syntaxbox">var <var>new_array</var> = <var>old_array</var>.concat(<var>value1</var>[, <var>value2</var>[, ...[, <var>valueN</var>]]])</pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>value<em>N</em></code>{{optional_inline}}</dt>
@@ -29,7 +29,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/concat
<p>新的 {{jsxref("Array")}} 实例。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>concat</code>方法创建一个新的数组,它由被调用的对象中的元素组成,每个参数的顺序依次是该参数的元素(如果参数是数组)或参数本身(如果参数不是数组)。它不会递归到嵌套数组参数中。</p>
@@ -47,9 +47,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/concat
<p><strong>注意:</strong>数组/值在连接时保持不变。此外,对于新数组的任何操作(仅当元素不是对象引用时)都不会对原始数组产生影响,反之亦然。</p>
</div>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Concatenating_two_arrays" name="Example:_Concatenating_two_arrays">连接两个数组</h3>
+<h3 id="Example_Concatenating_two_arrays">连接两个数组</h3>
<p>以下代码将两个数组合并为一个新数组:</p>
@@ -59,7 +59,7 @@ var numeric = [1, 2, 3];
alpha.concat(numeric);
// result in ['a', 'b', 'c', 1, 2, 3]</pre>
-<h3 id="Example_Concatenating_three_arrays" name="Example:_Concatenating_three_arrays">连接三个数组</h3>
+<h3 id="Example_Concatenating_three_arrays">连接三个数组</h3>
<p>以下代码将三个数组合并为一个新数组:</p>
@@ -72,7 +72,7 @@ var nums = num1.concat(num2, num3);
console.log(nums);
// results in [1, 2, 3, 4, 5, 6, 7, 8, 9]</pre>
-<h3 id="Example_Concatenating_values_to_an_array" name="Example:_Concatenating_values_to_an_array">将值连接到数组</h3>
+<h3 id="Example_Concatenating_values_to_an_array">将值连接到数组</h3>
<p>以下代码将三个值连接到数组:</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/copywithin/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/copywithin/index.html
index b19fa2fc56..63436145d7 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/copywithin/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/copywithin/index.html
@@ -23,7 +23,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/copyWithin
<pre class="syntaxbox"><var>arr</var>.copyWithin(<var>target[</var>, <var>start[</var>, <var>end]]</var>)
</pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>target</code></dt>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/fill/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/fill/index.html
index 07c1c104b5..0b7cdccee9 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/fill/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/fill/index.html
@@ -15,11 +15,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/fill
<p>{{EmbedInteractiveExample("pages/js/array-fill.html")}}</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre><var>arr</var>.fill(<var>value[</var>, <var>start[<var>, <var>end]]</var>)</var></var></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>value</code></dt>
@@ -34,7 +34,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/fill
<p>修改后的数组。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><strong><code>fill</code></strong> 方法接受三个参数 <code>value</code>, <code>start</code> 以及 <code>end</code>. <code>start</code> 和 <code>end</code> 参数是可选的, 其默认值分别为 <code>0</code> 和 <code>this</code> 对象的 <code>length </code>属性值。</p>
@@ -145,7 +145,7 @@ arr[0].hi = "hi"; // [{ hi: "hi" }, { hi: "hi" }, { hi: "hi" }]</pre>
</div>
-<h2 id="See_also" name="See_also">相关</h2>
+<h2 id="See_also">相关</h2>
<ul>
<li>{{jsxref("Array")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/find/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/find/index.html
index 425901f14d..ee5ad032da 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/find/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/find/index.html
@@ -19,11 +19,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/find
<p>如果你需要找到一个元素的位置或者一个元素是否存在于数组中,使用{{jsxref("Array.prototype.indexOf()")}} 或 {{jsxref("Array.prototype.includes()")}}。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><em>arr</em>.find(<em>callback</em>[, <em>thisArg</em>])</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>callback</code></dt>
@@ -45,7 +45,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/find
<p>数组中第一个满足所提供测试函数的元素的值,否则返回 {{jsxref("undefined")}}。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>find</code>方法对数组中的每一项元素执行一次 <code>callback</code> 函数,直至有一个 callback 返回 <code>true</code>。当找到了这样一个元素后,该方法会立即返回这个元素的值,否则返回 {{jsxref("undefined")}}。注意 <code>callback </code>函数会为数组中的每个索引调用即从 <code>0 </code>到 <code>length - 1</code>,而不仅仅是那些被赋值的索引,这意味着对于稀疏数组来说,该方法的效率要低于那些只遍历有值的索引的方法。</p>
@@ -114,7 +114,7 @@ a.find(function(value, index) {
console.log('Visited index ' + index + ' with value ' + value);
});</pre>
-<h2 id="Polyfill" name="Polyfill">Polyfill</h2>
+<h2 id="Polyfill">Polyfill</h2>
<p>本方法在ECMAScript 6规范中被加入,可能不存在于某些实现中。你可以通过以下代码来补充 <code>Array.prototype.find()</code>。</p>
@@ -189,7 +189,7 @@ if (!Array.prototype.find) {
<p>{{Compat("javascript.builtins.Array.find")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.findIndex()")}} – find and return an index</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/findindex/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/findindex/index.html
index ecde3c0f25..39faf1fdf3 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/findindex/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/findindex/index.html
@@ -18,11 +18,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/findIndex
<p>另请参见  {{jsxref("Array.find", "find()")}} 方法,它返回数组中找到的元素的<strong>值</strong>,而不是其索引。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><em>arr</em>.findIndex(<em>callback</em>[, <em>thisArg</em>])</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>callback</code></dt>
@@ -44,7 +44,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/findIndex
<p>    数组中通过提供测试函数的第一个元素的<strong>索引</strong>。否则,返回-1</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>findIndex</code>方法对数组中的每个数组索引<code>0..length-1</code>(包括)执行一次<code>callback</code>函数,直到找到一个<code>callback</code>函数返回真实值(强制为<code>true</code>)的值。如果找到这样的元素,<code>findIndex</code>会立即返回该元素的索引。如果回调从不返回真值,或者数组的<code>length</code>为0,则<code>findIndex</code>返回-1。 与某些其他数组方法(如Array#some)不同,在稀疏数组中,即使对于数组中不存在的条目的索引也会调用回调函数。</p>
@@ -56,9 +56,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/findIndex
<p>在第一次调用<code>callback</code>函数时会确定元素的索引范围,因此在<code>findIndex</code>方法开始执行之后添加到数组的新元素将不会被<code>callback</code>函数访问到。如果数组中一个尚未被<code>callback</code>函数访问到的元素的值被<code>callback</code>函数所改变,那么当<code>callback</code>函数访问到它时,它的值是将是根据它在数组中的索引所访问到的当前值。被删除的元素仍然会被访问到。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Testing_size_of_all_array_elements" name="Example:_Testing_size_of_all_array_elements">查找数组中首个质数元素的索引</h3>
+<h3 id="Example_Testing_size_of_all_array_elements">查找数组中首个质数元素的索引</h3>
<p>以下示例查找数组中素数的元素的索引(如果不存在素数,则返回-1)。</p>
@@ -153,7 +153,7 @@ if (!Array.prototype.findIndex) {
<p>{{Compat("javascript.builtins.Array.findIndex")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.find()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/indexof/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/indexof/index.html
index c470a8b265..a4ef7ead3b 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/indexof/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/indexof/index.html
@@ -20,7 +20,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/indexOf
<p>注意:对于String方法,请参阅 {{jsxref("String.prototype.indexOf()")}}。</p>
</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre><var>arr</var>.indexOf(<var>searchElement</var>[, <var>fromIndex</var>])</pre>
@@ -189,7 +189,7 @@ if (!Array.prototype.indexOf) {
<p>{{Compat("javascript.builtins.Array.indexOf")}}</p>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.lastIndexOf()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/join/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/join/index.html
index c40b87ebed..b4c06b6acb 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/join/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/join/index.html
@@ -14,11 +14,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/join
<div>{{EmbedInteractiveExample("pages/js/array-join.html")}}</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre><var>arr</var>.join([<var>separator</var>])</pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>separator</code> {{optional_inline}}</dt>
@@ -29,7 +29,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/join
<dd>一个所有数组元素连接的字符串。如果 <code>arr.length</code><strong> </strong>为0,则返回空字符串。</dd>
</dl>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>所有的数组元素被转换成字符串,再用一个分隔符将这些字符串连接起来。</p>
@@ -37,9 +37,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/join
<p>如果一个元素为 <code>undefined</code> 或 <code>null</code>,它会被转换为空字符串。</p>
</div>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Joining_an_array_three_different_ways" name="Example:_Joining_an_array_three_different_ways">使用四种不同的分隔符连接数组元素</h3>
+<h3 id="Example_Joining_an_array_three_different_ways">使用四种不同的分隔符连接数组元素</h3>
<p>下例首先创建了一个数组 <code>a</code>,包含有三个元素,然后用四种不同的分隔符连接所有数组元素。首先是默认的分隔符逗号,然后是一个逗号加空格,接下来是一个加号前后加空格,最后是一个空字符串。</p>
@@ -60,7 +60,7 @@ var myVar4 = a.join(''); // myVar4的值变为"WindRainFire"
}
f(1, 'a', true);</code></pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<tbody>
@@ -92,7 +92,7 @@ f(1, 'a', true);</code></pre>
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
<div>
<div>
@@ -102,7 +102,7 @@ f(1, 'a', true);</code></pre>
</div>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("String.prototype.split()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/keys/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/keys/index.html
index 6da9228ed2..b8e10fdada 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/keys/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/keys/index.html
@@ -16,7 +16,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/keys
<div>{{EmbedInteractiveExample("pages/js/array-keys.html")}}</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><var>arr</var>.keys()</code>
</pre>
@@ -25,7 +25,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/keys
<p>一个新的 {{jsxref("Array")}} 迭代器对象。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
<h3 id="索引迭代器会包含那些没有对应元素的索引">索引迭代器会包含那些没有对应元素的索引</h3>
@@ -36,7 +36,7 @@ console.log(sparseKeys); // ['0', '2']
console.log(denseKeys); // [0, 1, 2]
</pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<tbody>
@@ -58,7 +58,7 @@ console.log(denseKeys); // [0, 1, 2]
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
<div>
<div>
@@ -68,7 +68,7 @@ console.log(denseKeys); // [0, 1, 2]
</div>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.values()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html
index 51cf89a71f..8d3c63aab0 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html
@@ -5,17 +5,17 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf
---
<div>{{JSRef("Global_Objects", "Array")}}</div>
-<h2 id="Summary" name="Summary">概述</h2>
+<h2 id="Summary">概述</h2>
<p><code><strong>lastIndexOf()</strong></code> 方法返回指定元素(也即有效的 JavaScript 值或变量)在数组中的最后一个的索引,如果不存在则返回 -1。从数组的后面向前查找,从 <code>fromIndex</code> 处开始。</p>
<div>{{EmbedInteractiveExample("pages/js/array-lastindexof.html")}}</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre><var>arr</var>.lastIndexOf(<var>searchElement[</var>, <var>fromIndex]</var>)</pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>searchElement</code></dt>
@@ -29,13 +29,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf
</dd>
</dl>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>lastIndexOf</code> 使用<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Using_the_Equality_Operators">严格相等</a>(strict equality,即 ===)比较 <code>searchElement</code> 和数组中的元素。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Using_lastIndexOf" name="Example:_Using_lastIndexOf">例子:使用 lastIndexOf</h3>
+<h3 id="Example_Using_lastIndexOf">例子:使用 lastIndexOf</h3>
<p>下例使用 <code>lastIndexOf</code> 定位数组中的值。</p>
@@ -54,7 +54,7 @@ index = array.lastIndexOf(2, -1);
// index is 3
</pre>
-<h3 id="Example_Finding_all_the_occurrences_of_an_element" name="Example:_Finding_all_the_occurrences_of_an_element">例子:查找所有元素</h3>
+<h3 id="Example_Finding_all_the_occurrences_of_an_element">例子:查找所有元素</h3>
<p>下例使用 <code>lastIndexOf</code> 查找到一个元素在数组中所有的索引(下标),并使用 {{jsxref("Array.push", "push")}} 将所有添加到另一个数组中。</p>
@@ -80,7 +80,7 @@ console.log(indices);
<code>idx &gt; 0</code>时,才进入lastIndexOf由后往前移一位进行倒查找;如果<code>idx == 0</code>则直接设置<code>idx = -1</code>,循环<code>while (idx != -1)</code>就结束了。<br>
 </p>
-<h2 id="Compatibility" name="Compatibility">兼容旧环境(Polyfill)</h2>
+<h2 id="Compatibility">兼容旧环境(Polyfill)</h2>
<p><code>lastIndexOf</code> 在 ECMA-262 标准第 5 版被添加。因此它在不兼容该标准的浏览器中可能不被支持。你可以把下面代码添加到脚本中来使那些没有实现该方法的实现环境支持该方法。该算法是被 ECMA-262 第 5 版指定的。假定 {{jsxref("Global_Objects/Object", "Object")}}、{{jsxref("Global_Objects/TypeError", "TypeError")}}、{{jsxref("Global_Objects/Number", "Number")}}、{{jsxref("Math.floor")}}、{{jsxref("Math.abs")}},以及 {{jsxref("Math.min")}} 拥有其初始值。</p>
@@ -168,7 +168,7 @@ console.log(indices);
<p>{{Compat("javascript.builtins.Array.lastIndexOf")}}</p>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.indexOf()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html
index de5862921d..dfab0b020f 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html
@@ -14,7 +14,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/length
<div>{{EmbedInteractiveExample("pages/js/array-length.html")}}</div>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>length</code> 属性的值是一个 0 到 2<sup>32</sup>-1 的整数。</p>
@@ -76,9 +76,9 @@ function printEntries(arr) {
<li><code>Enumerable</code> :如果设置为 <code>true</code> ,属性可以通过迭代器<a href="zh-CN/docs/Web/JavaScript/Reference/Statements/for">for</a>或<a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for...in">for...in</a>进行迭代。</li>
</ul>
-<h2 id="Examples" name="Examples">示例 </h2>
+<h2 id="Examples">示例 </h2>
-<h3 id="Example:_Iterating_over_an_array" name="Example:_Iterating_over_an_array">遍历数组</h3>
+<h3 id="Example:_Iterating_over_an_array">遍历数组</h3>
<p>下面的例子中,通过数组下标遍历数组元素,并把每个元素的值修改为原值的2倍。</p>
@@ -89,7 +89,7 @@ for (var i = 0; i &lt; length; i++) {
}
// 遍历后的结果 [2, 4, 6, 8, 10]</pre>
-<h3 id="Example:_Shortening_an_array" name="Example:_Shortening_an_array">截断数组</h3>
+<h3 id="Example:_Shortening_an_array">截断数组</h3>
<p>下面的例子中,如果数组长度大于 3,则把该数组的长度截断为 3 。</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/map/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/map/index.html
index 15e10d0329..dc8241fd26 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/map/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/map/index.html
@@ -18,13 +18,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/map
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre><var>var new_array = arr</var>.map(function <var>callback(currentValue[, index[, array]]) {
// Return element for new_array </var>
<var>}</var>[, <var>thisArg</var>])</pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>callback</code></dt>
@@ -46,7 +46,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/map
<p>一个由原数组每个元素执行回调函数的结果组成的新数组。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>map</code> 方法会给原数组中的每个元素都按顺序调用一次  <code>callback</code> 函数。<code>callback</code> 每次执行后的返回值(包括 {{jsxref("undefined")}})组合起来形成一个新数组。 <code>callback</code> 函数只会在有值的索引上被调用;那些从来没被赋过值或者使用 <code>delete</code> 删除的索引则不会被调用。</p>
@@ -62,9 +62,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/map
<p>根据规范中定义的算法,如果被map调用的数组是离散的,新数组将也是离散的保持相同的索引为空。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Mapping_an_array_of_numbers_to_an_array_of_square_roots" name="Example:_Mapping_an_array_of_numbers_to_an_array_of_square_roots">求数组中每个元素的平方根</h3>
+<h3 id="Example_Mapping_an_array_of_numbers_to_an_array_of_square_roots">求数组中每个元素的平方根</h3>
<p>下面的代码创建了一个新数组,值为原数组中对应数字的平方根。</p>
@@ -94,7 +94,7 @@ var reformattedArray = kvArray.map(function(obj) {
// {key: 3, value: 30}]
</pre>
-<h3 id="Example_Pluralizing_the_words_.28strings.29_in_an_array" name="Example:_Pluralizing_the_words_.28strings.29_in_an_array">使用一个包含一个参数的函数来mapping(构建)一个数字数组</h3>
+<h3 id="Example_Pluralizing_the_words_.28strings.29_in_an_array">使用一个包含一个参数的函数来mapping(构建)一个数字数组</h3>
<p>下面的代码表示了当函数需要一个参数时map的工作方式。当map循环遍历原始数组时,这个参数会自动被分配成数组中对应的每个元素。</p>
@@ -106,7 +106,7 @@ var doubles = numbers.map(function(num) {
// doubles数组的值为: [2, 8, 18]
// numbers数组未被修改: [1, 4, 9]</pre>
-<h3 id="Example_using_map_generically" name="Example:_using_map_generically">一般的<code>map</code> 方法</h3>
+<h3 id="Example_using_map_generically">一般的<code>map</code> 方法</h3>
<p>下面的例子演示如何在一个 {{jsxref("String")}}  上使用 map 方法获取字符串中每个字符所对应的 ASCII 码组成的数组:</p>
@@ -334,7 +334,7 @@ if (!Array.prototype.map) {
<p>{{Compat("javascript.builtins.Array.map")}}</p>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.forEach()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/of/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/of/index.html
index 9013ce9446..8c12486fe2 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/of/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/of/index.html
@@ -24,11 +24,11 @@ Array(7); // [ , , , , , , ]
Array(1, 2, 3); // [1, 2, 3]
</pre>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code>Array.of(<var>element0</var>[, <var>element1</var>[, ...[, <var>elementN</var>]]])</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt>element<em>N</em></dt>
@@ -50,7 +50,7 @@ Array.of(1, 2, 3); // [1, 2, 3]
Array.of(undefined); // [undefined]
</pre>
-<h2 id="Compatibility" name="Compatibility">兼容旧环境</h2>
+<h2 id="Compatibility">兼容旧环境</h2>
<p>如果原生不支持的话,在其他代码之前执行以下代码会创建 <code>Array.of()</code> 。</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/pop/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/pop/index.html
index 3e6caa6795..9ee915c4f4 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/pop/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/pop/index.html
@@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/pop
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><em>arr</em>.pop()</code></pre>
@@ -25,7 +25,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/pop
<p>从数组中删除的元素(当数组为空时返回{{jsxref("undefined")}})。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>pop</code> 方法从一个数组中删除并返回最后一个元素。</p>
@@ -33,9 +33,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/pop
<p>如果你在一个空数组上调用 pop(),它返回  {{jsxref("undefined")}}。</p>
-<h2 id="Example" name="Example">示例</h2>
+<h2 id="Example">示例</h2>
-<h3 id="Example:_Removing_the_last_element_of_an_array" name="Example:_Removing_the_last_element_of_an_array">例子: 删除掉数组的最后一个元素</h3>
+<h3 id="Example:_Removing_the_last_element_of_an_array">例子: 删除掉数组的最后一个元素</h3>
<p>下面的代码首先创建了一个拥有四个元素的数组 myFish,然后删除掉它的最后一个元素。</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/push/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/push/index.html
index 032e985d22..fd1154f7c6 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/push/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/push/index.html
@@ -36,7 +36,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/push
<p>当调用该方法时,新的 {{jsxref("Array.length", "length")}} 属性值将被返回。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>push方法将值追加到数组中。</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/reverse/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/reverse/index.html
index b408aa046f..2ec4feba05 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/reverse/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/reverse/index.html
@@ -132,7 +132,7 @@ console.log(a); // {0: 3, 1: 2, 2: 1, length: 3}</code></pre>
</div>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.join()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/slice/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/slice/index.html
index d62b834d40..74703cbe04 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/slice/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/slice/index.html
@@ -57,7 +57,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/slice
<p>如果向两个数组任一中添加了新元素,则另一个不会受到影响。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
<h3 id="返回现有数组的一部分">返回现有数组的一部分</h3>
@@ -108,7 +108,7 @@ The new color of my Honda is purple
newCar[0].color = purple
</pre>
-<h2 id="Array-like" name="Array-like">类数组(Array-like)对象</h2>
+<h2 id="Array-like">类数组(Array-like)对象</h2>
<p><code>slice</code> 方法可以用来将一个类数组(Array-like)对象/集合转换成一个新数组。你只需将该方法绑定到这个对象上。 一个函数中的  {{jsxref("Functions/arguments", "arguments")}} 就是一个类数组对象的例子。</p>
@@ -242,7 +242,7 @@ var list1 = list(1, 2, 3); // [1, 2, 3]
<p>{{Compat("javascript.builtins.Array.slice")}}</p>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.splice()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/some/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/some/index.html
index 8c5aabec0f..a0f5695dfb 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/some/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/some/index.html
@@ -20,11 +20,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/some
<div>{{EmbedInteractiveExample("pages/js/array-some.html")}}</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><em>arr</em>.some(<em>callback(element[, index[, array]])[, thisArg]</em>)</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>callback</code></dt>
@@ -46,7 +46,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/some
<p>数组中有至少一个元素通过回调函数的测试就会返回<strong><code>true</code></strong>;所有元素都没有通过回调函数的测试返回值才会为false。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>some()</code> 为数组中的每一个元素执行一次 <code>callback</code> 函数,直到找到一个使得 callback 返回一个“真值”(即可转换为布尔值 true 的值)。如果找到了这样一个值,<code>some()</code> 将会立即返回 <code>true</code>。否则,<code>some()</code> 返回 <code>false</code>。<code>callback</code> 只会在那些”有值“的索引上被调用,不会在那些被删除或从来未被赋值的索引上调用。</p>
@@ -58,9 +58,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/some
<p><code>some()</code> 遍历的元素的范围在第一次调用 <code>callback</code>. 前就已经确定了。在调用 <code>some()</code> 后被添加到数组中的值不会被 <code>callback</code> 访问到。如果数组中存在且还未被访问到的元素被 <code>callback</code> 改变了,则其传递给 <code>callback</code> 的值是 <code>some()</code> 访问到它那一刻的值。已经被删除的元素不会被访问到。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Testing_size_of_all_array_elements" name="Example:_Testing_size_of_all_array_elements">测试数组元素的值</h3>
+<h3 id="Example_Testing_size_of_all_array_elements">测试数组元素的值</h3>
<p>下面的例子检测在数组中是否有元素大于 10。</p>
@@ -127,7 +127,7 @@ getBoolean(1); // true
getBoolean('true'); // true
</pre>
-<h2 id="Compatibility" name="Compatibility">Polyfill</h2>
+<h2 id="Compatibility">Polyfill</h2>
<p>在第 5 版时,<code>some()</code> 被添加进 ECMA-262 标准;这样导致某些实现环境可能不支持它。你可以把下面的代码插入到脚本的开头来解决此问题,从而允许在那些没有原生支持它的实现环境中使用它。该算法是 ECMA-262 第 5 版中指定的算法,假定 <code>Object </code>和 <code>TypeError</code> 拥有他们的初始值,且 <code>fun.call</code> 等价于 <code>{{jsxref("Function.prototype.call")}}</code>。</p>
@@ -196,7 +196,7 @@ if (!Array.prototype.some) {
<p>{{Compat("javascript.builtins.Array.some")}}</p>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.find()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/sort/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/sort/index.html
index e4140bde3b..49a4339d87 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/sort/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/sort/index.html
@@ -42,7 +42,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/sort
<p>排序后的数组。请注意,数组已原地排序,并且不进行复制。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>如果没有指明 <code>compareFunction</code> ,那么元素会按照转换为的字符串的诸个字符的Unicode位点进行排序。例如 "Banana" 会被排列到 "cherry" 之前。当数字按由小到大排序时,9 出现在 80 之前,但因为(没有指明 <code>compareFunction</code>),比较的数字会先被转换为字符串,所以在Unicode顺序上 "80" 要比 "9" 要靠前。</p>
@@ -129,9 +129,9 @@ items.sort(function(a, b) {
return 0;
});</pre>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Creating.2C_displaying.2C_and_sorting_an_array" name="Example:_Creating.2C_displaying.2C_and_sorting_an_array">创建、显示及排序数组</h3>
+<h3 id="Example_Creating.2C_displaying.2C_and_sorting_an_array">创建、显示及排序数组</h3>
<p>下述示例创建了四个数组,并展示原数组。之后对数组进行排序。对比了数字数组分别指定与不指定比较函数的结果。</p>
@@ -179,7 +179,7 @@ Sorted without a compare function: 1,200,40,5,700,80,9
Sorted with compareNumbers: 1,5,9,40,80,200,700
</pre>
-<h3 id="Example_Sorting_non-ASCII_characters" name="Example:_Sorting_non-ASCII_characters">对非 ASCII 字符排序</h3>
+<h3 id="Example_Sorting_non-ASCII_characters">对非 ASCII 字符排序</h3>
<p>当排序非 ASCII 字符的字符串(如包含类似 e, é, è, a, ä 等字符的字符串)。一些非英语语言的字符串需要使用 {{jsxref("String.localeCompare")}}。这个函数可以将函数排序到正确的顺序。</p>
@@ -191,7 +191,7 @@ items.sort(function (a, b) {
// items is ['adieu', 'café', 'cliché', 'communiqué', 'premier', 'réservé']
</pre>
-<h3 id="Example_Sorting_maps" name="Example:_Sorting_maps">使用映射改善排序</h3>
+<h3 id="Example_Sorting_maps">使用映射改善排序</h3>
<p><code>compareFunction</code> 可能需要对元素做多次映射以实现排序,尤其当 <code>compareFunction</code> 较为复杂,且元素较多的时候,某些 <code>compareFunction</code> 可能会导致很高的负载。使用 map 辅助排序将会是一个好主意。基本思想是首先将数组中的每个元素比较的实际值取出来,排序后再将数组恢复。</p>
@@ -253,7 +253,7 @@ var result = mapped.map(function(el){
];
</pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<tbody>
@@ -285,7 +285,7 @@ var result = mapped.map(function(el){
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
<div>
<div>
@@ -295,7 +295,7 @@ var result = mapped.map(function(el){
</div>
</div>
-<h2 id="See_also" name="See_also">参考</h2>
+<h2 id="See_also">参考</h2>
<ul>
<li>{{jsxref("Array.prototype.reverse()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html
index 729e537627..b893cd7f87 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html
@@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/toLocaleString
<div>{{EmbedInteractiveExample("pages/js/array-tolocalestring.html")}}</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code>arr.toLocaleString([locales[,options]]);</code></pre>
@@ -166,7 +166,7 @@ if (!Array.prototype.toLocaleString) {
<p>{{Compat("javascript.builtins.Array.toLocaleString")}}</p>
-<h2 id="See_also" name="See_also">参见</h2>
+<h2 id="See_also">参见</h2>
<ul>
<li>{{jsxref("Array.prototype.toString()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/tosource/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/tosource/index.html
index 7ff8cff304..a5371b0a9f 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/tosource/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/tosource/index.html
@@ -5,25 +5,25 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/toSource
---
<p>{{JSRef("Global_Objects", "Array")}}{{Non-standard_header}}</p>
-<h2 id="Summary" name="Summary">概述</h2>
+<h2 id="Summary">概述</h2>
<p>返回一个字符串,代表该数组的源代码.</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><em>array</em>.toSource()</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<p>无</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>在调试时,你可以使用<code>toSource方法</code>来查看一个数组的内容.</p>
-<h2 id="Examples" name="Examples">例子</h2>
+<h2 id="Examples">例子</h2>
-<h3 id="Example:_Examining_the_source_code_of_an_array" name="Example:_Examining_the_source_code_of_an_array">例子: 查看数组的源码</h3>
+<h3 id="Example:_Examining_the_source_code_of_an_array">例子: 查看数组的源码</h3>
<pre class="brush:js">var alpha = new Array("a", "b", "c");
@@ -33,7 +33,7 @@ alpha.toSource(); //返回["a", "b", "c"]</pre>
<p>{{Compat("javascript.builtins.Array.toSource")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a href="/zh-CN/docs/JavaScript/Reference/Global_Objects/Array/toString" title="JavaScript/Reference/Global_Objects/Array/toString">Array.toString</a></li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/tostring/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/tostring/index.html
index 2378e078f8..3c41f1dbc4 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/tostring/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/tostring/index.html
@@ -13,12 +13,12 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/toString
<div>{{EmbedInteractiveExample("pages/js/array-tostring.html")}}</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="brush: js">arr.toString()
</pre>
-<h3 id="Parameters" name="Parameters">返回值</h3>
+<h3 id="Parameters">返回值</h3>
<p>一个表示指定的数组及其元素的字符串。</p>
@@ -72,7 +72,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/toString
<p>{{Compat("javascript.builtins.Array.toString")}}</p>
</div>
-<h2 id="See_Also" name="See_Also">相关链接</h2>
+<h2 id="See_Also">相关链接</h2>
<ul>
<li>{{jsxref("Array.prototype.join()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/unshift/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/unshift/index.html
index b05c74e64f..e6e2a8b693 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/unshift/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/unshift/index.html
@@ -17,12 +17,12 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/unshift
<div>{{EmbedInteractiveExample("pages/js/array-unshift.html")}}</div>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox">arr.unshift(element1, ..., elementN)
</pre>
-<h3 id="Parameters" name="Parameters">参数列表</h3>
+<h3 id="Parameters">参数列表</h3>
<dl>
<dt><code>elementN</code></dt>
@@ -36,7 +36,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/unshift
<dl>
</dl>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>unshift</code> 方法会在调用它的类数组对象的开始位置插入给定的参数。</p>