var let const的区别

1.作用域区别

 

letconst具有块级作用域,var不存在块级作用域,可以跨块访问, 不能跨函数访问

posted on 2023-08-18 18:57  hellowworld!  阅读(7)  评论(0编辑  收藏  举报

导航