Which of the following is NOT a type of polymorphism supported by JavaScript?
- Compile-time polymorphism
- Runtime polymorphism
- Ad-hoc polymorphism
- Parametric polymorphism
JavaScript supports runtime polymorphism and ad-hoc polymorphism (also known as function overloading), allowing different behavior for functions with the same name but different parameters. Parametric polymorphism is associated with generics and is not a form of polymorphism in JavaScript.
Loading...
Related Quiz
- What is the output of the arithmetic expression 7 / 0 in JavaScript?
- What does the async keyword do in front of a function in JavaScript?
- How can a subclass be created in JavaScript?
- The Fetch API returns a _________ which resolves to the Response of the request, whether it is successful or not.
- How to declare a constant array in JavaScript?