if (!('c' in window)) { var c = 'good' } alert(c); 输出undefined是因为变量声明提升吗