class StaticMethodCall {
constructor() {
console.log(StaticMethodCall.staticMethod());
// 'static method has been called.'
console.log(StaticMethodCall.constructor().staticMethod());
// 'static method has been called.'
}
static staticMethod() {
return 'static method has been called.';
}
}
as =new StaticMethodCall();
console.log(StaticMethodCall.staticMethod());
console.log(this.constructor.staticMethod());
댓글 영역