相关疑难解决方法(0)

ES6课程不适用于Chrome 47

自版本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工作得很好.这是正常的吗?

javascript google-chrome ecmascript-6

6
推荐指数
1
解决办法
1305
查看次数

标签 统计

ecmascript-6 ×1

google-chrome ×1

javascript ×1