我在 javascript 中使用较新的类定义,但我无法让 netbeans 识别它们。有什么方法可以更新 netbeans 中的代码突出显示吗?例如,下面的代码现在被标记为错误:
class Polygon {
constructor(height, width) {
this.height = height;
this.width = width;
}
}
最佳答案
将项目的javascript版本设置更改为ECMAScript 6。在IDE中会弹出错误,您可以使用自动修复。
关于netbeans 中的 javascript 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38065948/