Skip to content
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

面试题目总结。 #1

Open
gjqiang opened this issue Mar 26, 2019 · 0 comments
Open

面试题目总结。 #1

gjqiang opened this issue Mar 26, 2019 · 0 comments

Comments

@gjqiang
Copy link
Owner

gjqiang commented Mar 26, 2019

f();  // hehe;
function f(){
    alert("hehe");
}

上下文代码执行时有两个阶段,
1、进入上下文 2、执行代码

进入上下文之时 VO 里包含三种属性,
1.形参,值未传入的值,或undefined
2.函数声明,值为function
3.变量声明,值为undefined

函数声明可以覆盖同名属性(即同名形参、变量),变量声明不能干扰形参、函数声明。

在代码执行阶段 VO 才会改变

http://www.cnblogs.com/TomXu/archive/2012/01/16/2309728.html#!comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant