var let const的区别

hi, / 2023-08-18 / 原文

1.作用域区别

 

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