aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/statements
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:03:27 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commit012ee621791b6895e637f96e6523027951768f25 (patch)
tree29cfacc0d5092af45870dcc74f22feb8b2664fbf /files/zh-cn/web/javascript/reference/statements
parentba91b017421b001cd226135612a7bd5dfcd88904 (diff)
downloadtranslated-content-012ee621791b6895e637f96e6523027951768f25.tar.gz
translated-content-012ee621791b6895e637f96e6523027951768f25.tar.bz2
translated-content-012ee621791b6895e637f96e6523027951768f25.zip
remove inline style for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/statements')
-rw-r--r--files/zh-cn/web/javascript/reference/statements/debugger/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/statements/do...while/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/statements/for...in/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/statements/function/index.html14
-rw-r--r--files/zh-cn/web/javascript/reference/statements/function_star_/index.html2
5 files changed, 13 insertions, 13 deletions
diff --git a/files/zh-cn/web/javascript/reference/statements/debugger/index.html b/files/zh-cn/web/javascript/reference/statements/debugger/index.html
index 2a54579002..0018dc056c 100644
--- a/files/zh-cn/web/javascript/reference/statements/debugger/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/debugger/index.html
@@ -12,14 +12,14 @@ translation_of: Web/JavaScript/Reference/Statements/debugger
<h2 id="语法">语法</h2>
-<pre class="syntaxbox" style="font-size: 14px; white-space: normal;"><code>debugger;</code>
+<pre class="syntaxbox"><code>debugger;</code>
</pre>
<h2 id="示例">示例</h2>
<p>下面的例子演示了一个包含 debugger 语句的函数,当函数被调用时,会尝试调用一个可用的调试器进行调试。</p>
-<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; font-size: 14px; white-space: normal; color: rgb(77, 78, 83);"><code class="language-js" style="direction: ltr; white-space: pre;">function potentiallyBuggyCode() {
+<pre class="brush:js language-js"><code class="language-js">function potentiallyBuggyCode() {
debugger;
// do potentially buggy stuff to examine, step through, etc.
}</code></pre>
diff --git a/files/zh-cn/web/javascript/reference/statements/do...while/index.html b/files/zh-cn/web/javascript/reference/statements/do...while/index.html
index 714c0e807e..89a850f722 100644
--- a/files/zh-cn/web/javascript/reference/statements/do...while/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/do...while/index.html
@@ -21,7 +21,7 @@ while (<em>condition</em>);
<dl>
<dt><code>statement</code></dt>
- <dd>执行至少一次的语句,并在每次 <code>condition</code> 值为真时重新执行。想执行多行语句,可使用{{jsxref("Statements/block", "block")}}语句(<code style="font-style: normal; line-height: 19.0909080505371px;">{ ... }</code>)包裹这些语句。</dd>
+ <dd>执行至少一次的语句,并在每次 <code>condition</code> 值为真时重新执行。想执行多行语句,可使用{{jsxref("Statements/block", "block")}}语句(<code>{ ... }</code>)包裹这些语句。</dd>
</dl>
<dl>
diff --git a/files/zh-cn/web/javascript/reference/statements/for...in/index.html b/files/zh-cn/web/javascript/reference/statements/for...in/index.html
index 8b3b346fcc..4bb666e930 100644
--- a/files/zh-cn/web/javascript/reference/statements/for...in/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/for...in/index.html
@@ -27,13 +27,13 @@ translation_of: Web/JavaScript/Reference/Statements/for...in
<h2 id="sect1"></h2>
-<h3 id="数组迭代和_for...in" style="line-height: 24px; font-size: 1.71428571428571rem;">数组迭代和 <code>for...in</code></h3>
+<h3 id="数组迭代和_for...in">数组迭代和 <code>for...in</code></h3>
<div class="note">
<p><strong>提示:</strong><code>for...in</code>不应该用于迭代一个关注索引顺序的 {{jsxref("Array")}}。</p>
</div>
-<h3 id="仅迭代自身的属性" style="line-height: 24px; font-size: 1.71428571428571rem;">仅迭代自身的属性</h3>
+<h3 id="仅迭代自身的属性">仅迭代自身的属性</h3>
<p>如果你只要考虑对象本身的属性,而不是它的原型,那么使用 {{jsxref("Object.getOwnPropertyNames", "getOwnPropertyNames()")}} 或执行 {{jsxref("Object.prototype.hasOwnProperty", "hasOwnProperty()")}} 来确定某属性是否是对象本身的属性(也能使用{{jsxref("Object.prototype.propertyIsEnumerable", "propertyIsEnumerable")}})。或者,如果你知道不会有任何外部代码干扰,您可以使用检查方法扩展内置原型。</p>
diff --git a/files/zh-cn/web/javascript/reference/statements/function/index.html b/files/zh-cn/web/javascript/reference/statements/function/index.html
index 4d8e036a2e..be8920fca8 100644
--- a/files/zh-cn/web/javascript/reference/statements/function/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/function/index.html
@@ -49,7 +49,7 @@ translation_of: Web/JavaScript/Reference/Statements/function
<p>默认情况下,函数是返回 undefined 的。想要返回一个其他的值,函数必须通过一个 <a href="/en/JavaScript/Reference/Statements/return">return</a> 语句指定返回值。</p>
-<h3 id="有条件的创建函数" style="line-height: 24px; font-size: 1.71428571428571rem;">有条件的创建函数</h3>
+<h3 id="有条件的创建函数">有条件的创建函数</h3>
<p>函数可以被有条件来声明,这意味着,函数声明可能出现在一个 if 语句里,但是,这种声明方式在不同的浏览器里可能有不同的效果。因此,不应该在生产环境代码中使用这种声明方式,应该使用函数表达式来代替。</p>
@@ -96,7 +96,7 @@ if (true) {
<p>JavaScript 中的<strong>函数声明</strong>被提升到了<strong>函数定义</strong>。你可以在函数声明之前使用该函数:</p>
-<pre class="brush: js language-js"><code class="language-js" style="direction: ltr; white-space: pre;">hoisted(); // logs "foo"
+<pre class="brush: js language-js"><code class="language-js">hoisted(); // logs "foo"
function hoisted() {
console.log('foo');
@@ -107,7 +107,7 @@ function hoisted() {
<p>注意 :<strong>函数表达式</strong>{{jsxref("Operators/function", "function expressions")}} 不会被提升:</p>
</div>
-<pre class="brush: js language-js"><code class="language-js" style="direction: ltr; white-space: pre;">notHoisted(); // TypeError: notHoisted is not a function
+<pre class="brush: js language-js"><code class="language-js">notHoisted(); // TypeError: notHoisted is not a function
var notHoisted = function() {
console.log('bar');
@@ -120,11 +120,11 @@ var notHoisted = function() {
<p>下面的代码声明了一个函数,该函数返回了销售的总金额, 参数是产品a,b,c分别的销售的数量.</p>
-<pre class="brush: js language-js"><code class="language-js" style="direction: ltr; white-space: pre;">function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction
+<pre class="brush: js language-js"><code class="language-js">function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction
return units_a*79 + units_b * 129 + units_c * 699;
}</code></pre>
-<h2 id="规范" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">规范</h2>
+<h2 id="规范">规范</h2>
<table class="standard-table">
<tbody>
@@ -151,13 +151,13 @@ var notHoisted = function() {
</tbody>
</table>
-<h2 id="浏览器兼容性" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">浏览器兼容性</h2>
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("javascript.statements.function")}}</p>
-<h2 id="See_also" name="See_also" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">相关链接</h2>
+<h2 id="See_also" name="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Functions_and_function_scope", "Functions and function scope")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/statements/function_star_/index.html b/files/zh-cn/web/javascript/reference/statements/function_star_/index.html
index 90794ec0d4..0ee47b290d 100644
--- a/files/zh-cn/web/javascript/reference/statements/function_star_/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/function_star_/index.html
@@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Statements/function*
---
<div>{{jsSidebar("Statements")}}</div>
-<p><code><strong>function*</strong></code> 这种声明方式(<code style="font-style: normal;">function</code>关键字后跟一个星号)会定义一个<strong><em>生成器函数</em> (</strong><em>generator function</em><strong>)</strong>,它返回一个  {{jsxref("Global_Objects/Generator","Generator")}}  对象。</p>
+<p><code><strong>function*</strong></code> 这种声明方式(<code>function</code>关键字后跟一个星号)会定义一个<strong><em>生成器函数</em> (</strong><em>generator function</em><strong>)</strong>,它返回一个  {{jsxref("Global_Objects/Generator","Generator")}}  对象。</p>
<div>{{EmbedInteractiveExample("pages/js/statement-functionasterisk.html")}}</div>