摘要: 1 var a = 1;2 function foo() {3 console.log(a);4 var a = 2;5 6 }7 8 foo(); //undefined根据变量提升机制,最后得出undefined;变量提升是指在一个作用域中声明的变量,JS解... 阅读全文
posted @ 2016-01-03 20:35 Sam的幻想 阅读(103) 评论(0) 推荐(0) 编辑