Статическая переменная в JavaScript
<script>
class Example {
static staticVariable = 'code_breaker';
//static variable defined
static staticMethod() {
return 'staticVariable is : '+this.staticVariable;
}
}
// static method called
console.log(Example.staticMethod());
</script>
Code_Breaker