知识点
let&const暂时性死区TDC
console.log(web); // undifined var申明变量产生变量提升
var web = "zhangtongxue"
console.log(web); //报错 let 需要在声明之后使用
let web = "zhangtongxue"
let web = 'zhagkai'
function func () {
//3.let web = 'yanyan'
console.log(web) //1. zhangkai
let web = 'yanyan' //2.在代码块中声明了与外部相同的变量名则报错 需放到上面
}
func();