aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/functions
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/functions')
-rw-r--r--files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/functions/arrow_functions/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/functions/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/functions/set/index.html2
5 files changed, 8 insertions, 8 deletions
diff --git a/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html b/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html
index f610b26d54..d814e6ce1f 100644
--- a/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html
@@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Functions/arguments/callee
<p><strong><code>callee</code></strong> 是 <code>arguments</code> 对象的一个属性。它可以用于引用该函数的函数体内当前正在执行的函数。这在函数的名称是未知时很有用,例如在没有名称的函数表达式 (也称为“匿名函数”)内。</p>
-<div class="warning"><strong>警告:</strong>在<a href="/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode" title="/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode">严格模式</a>下,第5版 ECMAScript (<strong>ES5</strong>) 禁止使用 <code>a<strong>rguments.callee()</strong>。当一个函数必须调用自身的时候, 避免使用 <strong>arguments.callee(), </strong></code>通过<code>要么</code>给函数表达式一个名字<font face="Consolas, Liberation Mono, Courier, monospace">,</font>要么使用一个函数声明.</div>
+<div class="warning"><strong>警告:</strong>在<a href="/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode" title="/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode">严格模式</a>下,第5版 ECMAScript (<strong>ES5</strong>) 禁止使用 <code>a<strong>rguments.callee()</strong>。当一个函数必须调用自身的时候, 避免使用 <strong>arguments.callee(), </strong></code>通过<code>要么</code>给函数表达式一个名字,要么使用一个函数声明.</div>
<h2 id="为什么_arguments.callee_从ES5严格模式中删除了?">为什么 arguments.callee 从ES5严格模式中删除了?</h2>
diff --git a/files/zh-cn/web/javascript/reference/functions/arrow_functions/index.html b/files/zh-cn/web/javascript/reference/functions/arrow_functions/index.html
index 674dcf9ad0..7f3ca61168 100644
--- a/files/zh-cn/web/javascript/reference/functions/arrow_functions/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/arrow_functions/index.html
@@ -96,7 +96,7 @@ elements.map(({ "length": lengthFooBArX }) =&gt; lengthFooBArX); // [8, 6, 7, 9]
<ul>
<li>如果该函数是一个构造函数,this指针指向一个新的对象</li>
- <li>在严格模式下的函数调用下,this指向<font face="consolas, Liberation Mono, courier, monospace">undefined</font></li>
+ <li>在严格模式下的函数调用下,this指向<code>undefined</code></li>
<li>如果该函数是一个对象的方法,则它的this指针指向这个对象</li>
<li>等等</li>
</ul>
@@ -153,7 +153,7 @@ f() === window; // 或者 global</code></pre>
<h4 id="通过_call_或_apply_调用">通过 call 或 apply 调用</h4>
-<p>由于 <font face="consolas, Liberation Mono, courier, monospace">箭头函数没有自己的this指针</font>,通过 <code>call()</code><em> 或</em> <code>apply()</code> 方法调用一个函数时,只能传递参数(不能绑定this---译者注),他们的第一个参数会被忽略。(这种现象对于bind方法同样成立---译者注)</p>
+<p>由于 箭头函数没有自己的this指针,通过 <code>call()</code><em> 或</em> <code>apply()</code> 方法调用一个函数时,只能传递参数(不能绑定this---译者注),他们的第一个参数会被忽略。(这种现象对于bind方法同样成立---译者注)</p>
<pre class="brush: js notranslate">var adder = {
base : 1,
diff --git a/files/zh-cn/web/javascript/reference/functions/index.html b/files/zh-cn/web/javascript/reference/functions/index.html
index 2184c429f3..6d48ab1c9a 100644
--- a/files/zh-cn/web/javascript/reference/functions/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/index.html
@@ -63,7 +63,7 @@ translation_of: Web/JavaScript/Reference/Functions
<p>定义函数有多种方法:</p>
-<h3 id="The_function_declaration_.28function_statement.29" name="The_function_declaration_.28function_statement.29">函数声明 (<font face="Consolas, Liberation Mono, Courier, monospace">函数</font>语句)</h3>
+<h3 id="The_function_declaration_.28function_statement.29" name="The_function_declaration_.28function_statement.29">函数声明 (函数语句)</h3>
<p>有一个特殊的语法来声明函数(查看<a href="/zh-cn/JavaScript/Reference/Statements/function" title="zh-cn/Core_JavaScript_1.5_Reference/Statements/function">函数语句</a>了解详情):</p>
@@ -283,14 +283,14 @@ translation_of: Web/JavaScript/Reference/Functions
} // 没有分号
</pre>
-<p>一个匿名函数的函数表达式,被赋值给变量<code><font face="Open Sans, Arial, sans-serif">multiply</font></code><font face="Open Sans, Arial, sans-serif">:</font></p>
+<p>一个匿名函数的函数表达式,被赋值给变量<code>multiply</code>:</p>
<pre class="brush: js line-numbers language-js"> var multiply = function(x, y) {
return x * y;
};
</pre>
-<p><font face="Open Sans, Arial, sans-serif">一个命名为<code>func_named</code>的函数的函数表达式,被赋值给变量</font><code><font face="Open Sans, Arial, sans-serif">multiply</font></code><font face="Open Sans, Arial, sans-serif">:</font></p>
+<p>一个命名为<code>func_named</code>的函数的函数表达式,被赋值给变量<code>multiply</code>:</p>
<pre class="brush: js">var multiply = function func_name(x, y) {
return x * y;
diff --git a/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html b/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html
index ededb09bcd..406552c11c 100644
--- a/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html
@@ -35,7 +35,7 @@ translation_of: Web/JavaScript/Reference/Functions/rest_parameters
<ul>
<li>剩余参数只包含那些没有对应形参的实参,而 <code>arguments</code> 对象包含了传给函数的所有实参。</li>
- <li><code>arguments</code>对象不是一个真正的数组,而剩余参数是真正的 <code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array" title="Array">Array</a></code>实例,也就是说你能够在它上面直接使用所有的数组方法,比如 <code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/sort" title="Array sort method">sort</a></code><font face="Open Sans, Arial, sans-serif">,</font><code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/map" title="Array map method">map</a></code><font face="Open Sans, Arial, sans-serif">,</font><code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/forEach" title="Array forEach method">forEach</a></code><font face="Open Sans, Arial, sans-serif">或</font><code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/pop" title="Array pop method">pop</a></code>。</li>
+ <li><code>arguments</code>对象不是一个真正的数组,而剩余参数是真正的 <code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array" title="Array">Array</a></code>实例,也就是说你能够在它上面直接使用所有的数组方法,比如 <code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/sort" title="Array sort method">sort</a></code>,<code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/map" title="Array map method">map</a></code>,<code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/forEach" title="Array forEach method">forEach</a></code>或<code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Array/pop" title="Array pop method">pop</a></code>。</li>
<li><code>arguments</code>对象还有一些附加的属性 (如<code>callee</code>属性)。</li>
</ul>
diff --git a/files/zh-cn/web/javascript/reference/functions/set/index.html b/files/zh-cn/web/javascript/reference/functions/set/index.html
index 2623cf4781..ce864843d1 100644
--- a/files/zh-cn/web/javascript/reference/functions/set/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/set/index.html
@@ -53,7 +53,7 @@ translation_of: Web/JavaScript/Reference/Functions/set
<h3 id="Example_Defining_a_getter_with_the_get_operator" name="Example:_Defining_a_getter_with_the_get_operator">在对象初始化时定义 setter</h3>
-<p>这将定义一个对象 <code><font face="consolas, Liberation Mono, courier, monospace">language</font></code> 的伪属性<code>current</code>,当<code>current</code>被分配一个值时,将使用该值更新<code>log</code>:</p>
+<p>这将定义一个对象 <code>language</code> 的伪属性<code>current</code>,当<code>current</code>被分配一个值时,将使用该值更新<code>log</code>:</p>
<pre class="brush: js">const language = {
set current(name) {