From 3b58e10991c03a7dfd6f0c3b3f7cdac4ad935c40 Mon Sep 17 00:00:00 2001 From: charlie Date: Mon, 14 Mar 2016 04:10:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/generator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generator.md b/docs/generator.md index 6bd52e7..665ba8a 100644 --- a/docs/generator.md +++ b/docs/generator.md @@ -10,7 +10,7 @@ Generator函数有多种理解角度。从语法上,首先可以把它理解 执行Generator函数会返回一个遍历器对象,也就是说,Generator函数除了状态机,还是一个遍历器对象生成函数。返回的遍历器对象,可以依次遍历Generator函数内部的每一个状态。 -形式上,Generator函数是一个普通函数,但是有两个特征。一是,`function`命令与函数名之间有一个星号;二是,函数体内部使用`yield`语句,定义不同的内部状态(yield语句在英语里的意思就是“产出”)。 +形式上,Generator函数是一个普通函数,但是有两个特征。一是,`function`关键字与函数名之间有一个星号;二是,函数体内部使用`yield`语句,定义不同的内部状态(yield语句在英语里的意思就是“产出”)。 ```javascript function* helloWorldGenerator() { From 29578117960369ee1685785bf2d138210be014e1 Mon Sep 17 00:00:00 2001 From: cntanglijun <869058216@qq.com> Date: Wed, 16 Mar 2016 00:55:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=80=97=E5=8F=B7=20:pray:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/function.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/function.md b/docs/function.md index a615bb8..11101ce 100644 --- a/docs/function.md +++ b/docs/function.md @@ -1165,7 +1165,7 @@ function addOne(a){ } ``` -上面的函数不会进行尾调用优化,因为内层函数`inner`用到了,外层函数`addOne`的内部变量`one`。 +上面的函数不会进行尾调用优化,因为内层函数`inner`用到了外层函数`addOne`的内部变量`one`。 ### 尾递归