The mechanism that allows you to use the structure of a class and alter it for use in another class is known as _________.

  • Inheritance
  • Polymorphism
  • Encapsulation
  • Abstraction
The mechanism that allows you to use the structure of a class and alter it for use in another class is known as "Inheritance." Inheritance in JavaScript is achieved through the prototype chain, where a child class can inherit properties and methods from a parent class, allowing for code reuse and extension.
Add your answer
Loading...

Leave a comment

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