var a = 100;
(function(){
console.log(a);
var a = 10;
})();輸出的結果為何是undefined, 如何修改結果輸出100?
一道關于Javascript變量作用域的面試題
慕森卡
2018-08-01 17:19:39