JavaScript

Polymorphism

Definition

The ability for different classes to respond to the same method call in different ways. In JavaScript, polymorphism is achieved through method overriding in subclasses and duck typing.

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms