var a = 2;(function IIFE(global){ var a =3 console.log(a)//3 console.log(global.a)//2})(window);console.log(a);//2let a = 2;(function IIFE(global){ var a =3 console.log(a)//3 console.log(global.a)//undefine 为什么变成undefined})(window);console.log(a);//2
添加回答
举报
0/150
提交
取消