变量查找顺序: arguments和函数内定义的变量或函数->父级->下一个父级->.....->全局环境中的变量或函数
if(true){
var a=1;
}
console.log(a); // 1
js没有块级作用域, 变量a直接添加到当前的执行环境中。 java有块级作用域,if语句结束后会销毁if中定义的变量