i have this situation
import assert from 'assert'
class A {
static x = 0
static a () {
return A.x
}
}
class B extends A {
static x = 1
}
assert.equal(B.a(), 1)
i need to retrive static value in derived class from base class in Js es6. but, i can't find a way,
the assertion will fails with
AssertionError [ERR_ASSERTION]: 0 == 1
what's the right way to do this?
- thanks