AlgoPulseMaster的头像 ID: 95988627626

AlgoPulseMaster

HelloWorld 社区成员

6050830311

文章3
个人网站0
加入社区2025

ES6的var/let/const区别

1.let只在代码块中有效2.var存在变量提升,即变量未声明也可以使用,输出undefinedlet/const只能在变量声明之后使用let/const存在暂时性死区,即在代码块中只要变量未声明在使用时都会报错,不管代码块外部有没有声明!image.png(https://imghe