Vah*_*iri 6 javascript google-chrome ecmascript-6
自版本42以来,Google Chrome声称支持ES6类,但是Uncaught SyntaxError: Unexpected token class(…)当我在控制台中运行下面的简单代码时,它会提供:
class Polygon {
constructor(height, width) {
this.name = 'Polygon';
this.height = height;
this.width = width;
}
Run Code Online (Sandbox Code Playgroud)
Firefox也不起作用.Microsoft Edge工作得很好.这是正常的吗?