是。但是它们更加严格。您的示例有两个主要区别。首先,使用类语法,没有new关键字就无法初始化实例。class Thing{}Thing() //Uncaught TypeError: Class constructor Thing cannot be invoked without 'new'var Thing = function() { if(!(this instanceof Thing)){ return new Thing(); }};Thing(); //works第二个是,使用类语法定义的类是块作用域的。类似于使用let关键字定义变量。class Thing{}class Thing{} //Uncaught SyntaxError: Identifier 'Thing' has already been declared{ class Thing{}}console.log(Thing); //Uncaught ReferenceError: Thing is not defined编辑正如@zeroflagL在他的评论中提到的那样,也不会悬挂类声明。console.log(Thing) //Uncaught ReferenceError: Thing is not definedclass Thing{}