I have a class lets say a test1 that has static methods #a and #b and is called from a public method lets say message(methodName) that has the argument, methodName (either a or b) that decided which method to call. If a and be were not static, I could do this
class test1 {
message(methodName) {
this[methodName]
}
a() {
}
b() {
}
}
but because they are static, I wanted to do,
class test1 {
message(methodName) {
this["#"+methodName]
}
#a() {
}
#b() {
}
}
But it does not work. Am i doing something wrong or is there some other way??
#does not mean "static". It means privatestatic, then see stackoverflow.com/questions/28627908/…