Polymorphism in JavaScript
For the longest time, I thought that “Polymorphing” was about converting something into sheep (thanks to Warcraft). The sheep image stuck with me and made it hard to understand exactly what Polymorphism is.
Today I want to explore what Polymorphism actually is. (Fun fact: Most articles about Polymorphism in JavaScript only 1/3 of what it actually is).
Click here to read the article!
What you’ll learn:
There are three kinds of Polymorphism:
- Adhoc Polymorphism
- Parametric Polymorphism
- Subtype Polymorphism (this one is what most people think of as polymorphism)
Fun Fact: The Factory Pattern actually uses Adhoc Polymorphism!
Enjoy!
Stay awesome,
Zell