File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1165,7 +1165,7 @@ function addOne(a){
11651165}
11661166```
11671167
1168- 上面的函数不会进行尾调用优化,因为内层函数` inner ` 用到了,外层函数 ` addOne ` 的内部变量` one ` 。
1168+ 上面的函数不会进行尾调用优化,因为内层函数` inner ` 用到了外层函数 ` addOne ` 的内部变量` one ` 。
11691169
11701170### 尾递归
11711171
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Generator函数有多种理解角度。从语法上,首先可以把它理解
1010
1111执行Generator函数会返回一个遍历器对象,也就是说,Generator函数除了状态机,还是一个遍历器对象生成函数。返回的遍历器对象,可以依次遍历Generator函数内部的每一个状态。
1212
13- 形式上,Generator函数是一个普通函数,但是有两个特征。一是,` function ` 命令与函数名之间有一个星号 ;二是,函数体内部使用` yield ` 语句,定义不同的内部状态(yield语句在英语里的意思就是“产出”)。
13+ 形式上,Generator函数是一个普通函数,但是有两个特征。一是,` function ` 关键字与函数名之间有一个星号 ;二是,函数体内部使用` yield ` 语句,定义不同的内部状态(yield语句在英语里的意思就是“产出”)。
1414
1515``` javascript
1616function * helloWorldGenerator () {
You can’t perform that action at this time.
0 commit comments