I am class and its subclasses, where I am required to call a static method of a child from the parent. But how can I call the static method without knowing which child?
class Animal{
static doSomething(){
//How do i call the static talk here?
//talk()
}
}
class Human extends Animal{
static talk(){
return 'Hello!'
}
}
class Dog extends Animal{
static talk(){
return 'Bark!'
}
}
Human.doSomething()