aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/operators/yield
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/yield
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/yield')
-rw-r--r--files/zh-cn/web/javascript/reference/operators/yield/index.html10
1 files changed, 5 insertions, 5 deletions
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>