/*变量和函数(除匿名函数外)会提前编译,所以结果是undefined*/
showdata();
function showdata(){
console.log(b);
var b=10;
}
b();
var b=function(){
console.log(1);
}
/*这里会说b is not a function
原因是匿名函数不能提前编译,变量却可以,
这里将b看做了变量,但是后面又出现了()于是报错*/