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

 

posted @ 2019-07-27 08:45  江山一族  阅读(125)  评论(0编辑  收藏  举报