a(); // a is not a function, a 应该是 undefined, a 的声明被提升
b(); // Uncaught ReferenceError: b is not defined
var a = function b(){console.log(1)}
a() // 1, a 是 [Function: b]
b() // Uncaught ReferenceError: b is not defined
同理
const C = class CC{}
new C(); // CC {}
new CC(); // Uncaught ReferenceError: CC is not defined
网友评论