There are two or more classes, each with a static class variable of the same name. Access to the contents of the static members usually takes place by specifying the class name.
class red {
static color = "ff0000";
…
}
class blue {
static color = "0000ff";
…
}
console.log(blue.color);
I know I can access the static members name like this
console.log(blue["color"]);
Is it possible to replace the class name by another variable?
…
let myClass = "blue";
console.log(myClass.color); ???