How does inheritance of static methods differ from that of instance methods in ES6?

  • Static methods cannot be inherited.
  • Static methods are inherited through the prototype chain.
  • Static methods are inherited using the extends keyword.
  • Static methods are inherited through the super keyword.
In ES6, static methods are inherited through the prototype chain, just like instance methods. The key difference lies in how they are called and accessed. The extends keyword is used to inherit static methods, making them accessible through the derived class. Option B is the correct answer.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *