-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
变量提升 #5
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
定义-- what
引擎会在解释JavaScript代码之前首先对齐进行编译,编译过程中的一部分工作就是找到所有的声明,并用合适的作用域将他们关联起来,这也正是词法作用域的核心内容
具体操作 -- how
变量提升包括: 变量提升,函数提升, 函数字面量提升
变量提升:将变量的定义提升到父作用域的顶部,默认等于undefined
函数提升:将变量的定义整体提升,包括赋值
函数字面量提升: 与变量提升相同
优先级 -- extend
【进阶1-1期】理解JavaScript 中的执行上下文和执行栈 yygmind/blog#12
The text was updated successfully, but these errors were encountered: