To access a parent class's method in a child class, the __________ keyword is used inside the method.

  • super
  • this
  • parent
  • extends
In JavaScript, the super keyword is used to refer to the parent class. When used inside a method in a child class, it allows you to call the corresponding method in the parent class. This is particularly useful for accessing and invoking the parent class's method from within the child class.
Add your answer
Loading...

Leave a comment

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