Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
var a=10; { console.log(a); let a =20 ; }
ReferenceError: a 未定义
为什么即使 a 是使用 var 声明的,它也应该在块内有它的范围,它也会给出参考错误?