执行上下文栈 <script> let a; function fun(a){ this.a=a function fun2(){ console.log("我是fun2"); } } a=10 fun(10) console.log(a); </script> 进行预处理的时候会预处理函数,函数里面定义了b,但函数预处理和window预处理一样会把b复制成underfind 但是b是在window里面 所以在实行if语句时就是if(!true)也就是 if(false)所以if语句不执行b还是underfind