<分区>
下面的语法,
class Polygon {
constructor(height, width) {
this.height = height;
this.width = width;
}
}
var Polygon = class {
constructor(height, width) {
this.height = height;
this.width = width;
}
};
var Polygon = class Polygon {
constructor(height, width) {
this.height = height;
this.width = width;
}
};
--
chrome 和 firefox 都不支持。
SyntaxError: 意外的 token 类(…)
已安装 chrome 版本 47.0.2526.80 m
安装的 firefox 版本 44.0a2 (2015-12-12)
哪个版本的浏览器支持 class
和 extends
关键字?