如何在类本身内部调用静态函数?我尝试自我关键字,而不是这个,但我仍然得到错误。无法在自己的类中调用静态函数
class Test {
static staticFunction() {
console.log('Inside static function.');
}
regularFunction() {
this.staticFunction();
}
}
let test = new Test();
test.regularFunction();
很棒@Patrick Hund,终于工作的解决方案:) – quarky