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

Update let.md

不应该是没有输出,只是输出的是“undefined”
This commit is contained in:
赵达 2015-09-21 01:28:13 +08:00
parent 24bc586266
commit 7ce0931bba

View File

@ -205,7 +205,7 @@ function f(){
} }
} }
f() // 没有输出 f() // undefined
``` ```
上面代码中函数f执行后没有任何输出原因在于变量提升导致内层的tmp变量覆盖了外层的tmp变量。 上面代码中函数f执行后没有任何输出原因在于变量提升导致内层的tmp变量覆盖了外层的tmp变量。