js变量提升

1.var c = 1;

   function c(c){

    console.log(c)

  }

  c(2) // c is not a function

2. var c = 1;

    function c (){}

console.log(typeof c) //'number'

3.

if(!b in window){
var b =1;
}
console.log(b) //undefind

原文地址:https://www.cnblogs.com/qiyc/p/11253767.html