From 8d1313c84cc82d81363ed62b75baedb9a65ff2e3 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:08:24 +0800 Subject: remove font tag in zh-CN --- .../web/javascript/reference/functions/arguments/callee/index.html | 2 +- .../web/javascript/reference/functions/arrow_functions/index.html | 4 ++-- files/zh-cn/web/javascript/reference/functions/index.html | 6 +++--- .../web/javascript/reference/functions/rest_parameters/index.html | 2 +- files/zh-cn/web/javascript/reference/functions/set/index.html | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/functions') 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

callee 是 arguments 对象的一个属性。它可以用于引用该函数的函数体内当前正在执行的函数。这在函数的名称是未知时很有用,例如在没有名称的函数表达式 (也称为“匿名函数”)内。

-
警告:严格模式下,第5版 ECMAScript (ES5) 禁止使用 arguments.callee()。当一个函数必须调用自身的时候, 避免使用 arguments.callee(), 通过要么给函数表达式一个名字,要么使用一个函数声明.
+
警告:严格模式下,第5版 ECMAScript (ES5) 禁止使用 arguments.callee()。当一个函数必须调用自身的时候, 避免使用 arguments.callee(), 通过要么给函数表达式一个名字,要么使用一个函数声明.

为什么 arguments.callee 从ES5严格模式中删除了?

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 }) => lengthFooBArX); // [8, 6, 7, 9] @@ -153,7 +153,7 @@ f() === window; // 或者 global

通过 call 或 apply 调用

-

由于 箭头函数没有自己的this指针,通过 call() 或 apply() 方法调用一个函数时,只能传递参数(不能绑定this---译者注),他们的第一个参数会被忽略。(这种现象对于bind方法同样成立---译者注)

+

由于 箭头函数没有自己的this指针,通过 call() 或 apply() 方法调用一个函数时,只能传递参数(不能绑定this---译者注),他们的第一个参数会被忽略。(这种现象对于bind方法同样成立---译者注)

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
 
 

定义函数有多种方法:

-

函数声明 (函数语句)

+

函数声明 (函数语句)

有一个特殊的语法来声明函数(查看函数语句了解详情):

@@ -283,14 +283,14 @@ translation_of: Web/JavaScript/Reference/Functions } // 没有分号
-

一个匿名函数的函数表达式,被赋值给变量multiply

+

一个匿名函数的函数表达式,被赋值给变量multiply

 var multiply = function(x, y) {
    return x * y;
  };
 
-

一个命名为func_named的函数的函数表达式,被赋值给变量multiply

+

一个命名为func_named的函数的函数表达式,被赋值给变量multiply

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
 
 
 
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
 
 

在对象初始化时定义 setter

-

这将定义一个对象 language 的伪属性current,当current被分配一个值时,将使用该值更新log

+

这将定义一个对象 language 的伪属性current,当current被分配一个值时,将使用该值更新log

const language = {
   set current(name) {
-- 
cgit v1.2.3-54-g00ecf