extend static class javascript code example
Example: extend static class javascript
class A {
static price = '8.99 PLN';
}
class B extends A {
static price = '6.99 PLN';
}
console.log(A.price); //➞ '8.99 PLN'
console.log(B.price); //➞ '6.99 PLN'