当前位置:网站首页>ES6 Const Let Var的区别
ES6 Const Let Var的区别
2022-08-04 05:26:00 【qq_26695613】
1.var 存在变量提升 而let 与const不存在变量提升
2.var 定义的变量可以声明很多次,而let. const定义的变量只能声明一次
3.var.let声明的变量可以再次赋值,而const声明的变量不能再次赋值
4.var声明的变量没有自身的作用域,而let、const声明的变量有自身的作用域(块级作用域
5. 利用var定义的变量,会自动挂载到window,但是let和const不会
6.let和const 存在暂时性死区问题
7.let const let定义变量 const定义常量
边栏推荐
猜你喜欢

SLSA 框架与软件供应链安全防护

8.03 Day34---BaseMapper查询语句用法

Can 't connect to MySQL server on' localhost3306 '(10061) simple solutions

Canal mysql data synchronization

Swoole学习(一)

Programming hodgepodge (3)
![Embedded system driver primary [3] - _IO model in character device driver foundation](/img/c7/21fc0651964a6a435e8ec5743b7662.png)
Embedded system driver primary [3] - _IO model in character device driver foundation

webrtc中视频采集实现分析(一) 采集及图像处理接口封装

webrtc中的任务队列TaskQueue

npm报错Beginning October 4, 2021, all connections to the npm registry - including for package installa
随机推荐
箭头函数的使用
npm init [email protected] 构建项目报错SyntaxError: Unexpected token ‘.‘解决办法
EntityComponentSystemSamples学习笔记
SLSA 框架与软件供应链安全防护
Handling List
使用express-jwt第三方包报错TypeError: expressJWT is not a function
TensorRT例程解读之语义分割demo
12、分页插件
乱码解决方案
The cost of automated testing is high and the effect is poor, so what is the significance of automated testing?
thymeleaf中onclick事件动态传递参数问题
Cannot read properties of null (reading ‘insertBefore‘)
js 基础学习笔记
力扣:70. 爬楼梯
Several ways to heavy
Unity自动生成阻挡Collider的GameObject工具
scrapy 爬取当当图书名字图片
CentOS7 - yum install mysql
OpenGLES 学习之帧缓存
Programming hodgepodge (4)