클래스 내부에서 정적 함수를 어떻게 호출합니까? 나는이 대신 자기 키워드를 시도하지만 여전히 오류가 발생합니다.자체 클래스 내에서 정적 함수를 호출 할 수 없습니다.
class Test {
static staticFunction() {
console.log('Inside static function.');
}
regularFunction() {
this.staticFunction();
}
}
let test = new Test();
test.regularFunction();
위대한 @Patrick Hund, 마침내 해결 방법 :) – quarky