The concept of creating a single function or method that can operate on multiple types of objects is known as _________.
- Overloading
- Inheritance
- Polymorphism
- Abstraction
The concept of creating a single function or method that can operate on multiple types of objects is known as "Polymorphism." In JavaScript, polymorphism can be achieved through method overriding and dynamic method binding, enabling different objects to respond to the same method in a way that suits their specific type.
Loading...
Related Quiz
- The data type of NaN in JavaScript is _________.
- A function declaration is hoisted to the top of the ________ in which it was defined.
- In order to make an object iterable with a for...of loop, you need to define its _______ method.
- Which of the following best describes a JavaScript callback function?
- The _______ pattern is used to create an instance of an object with some default values.