文章 评论 浏览 30
@alanchanzm 我觉得不对吧{ const foo = new Foo(); // ReferenceError: Foo is not defined class Foo { constructor() { this.foo = 37; } } } class会提升这段代码就说不过去!class
@alanchanzm 我觉得不对吧
{ const foo = new Foo(); // ReferenceError: Foo is not defined class Foo { constructor() { this.foo = 37; } } }
class会提升这段代码就说不过去!class
但是calss只提升不会赋值,你的这段代码是默认会提升而且赋值了
文章 0 评论 0
接受
但是calss只提升不会赋值,你的这段代码是默认会提升而且赋值了
第 7 题:ES5/ES6 的继承除了写法以外还有什么区别?