1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-27 20:32:21 +00:00

Merge pull request #125 from xinnix/gh-pages

模块章节  函数名写错  even() 被写成 foo()了
This commit is contained in:
Ruan YiFeng 2016-01-16 22:46:48 +08:00
commit 040f0e4279

View File

@ -665,7 +665,7 @@ true
17
```
上面代码中,参数`n`从10变为0的过程中`foo()`一共会执行6次所以变量`counter`等于6。第二次调用`even`时,参数`n`从20变为0`foo()`一共会执行11次加上前面的6次所以变量`counter`等于17。
上面代码中,参数`n`从10变为0的过程中`even()`一共会执行6次所以变量`counter`等于6。第二次调用`even()`时,参数`n`从20变为0`even()`一共会执行11次加上前面的6次所以变量`counter`等于17。
这个例子要是改写成CommonJS就根本无法执行会报错。