DEV Community

Discussion on: What is Polymorphism? - Explaining Polymorphism to a Five Year Old

lukeshiru profile image

You can use helicopter in any place you use aircraft, because they have the same methods (as noted by ...aircraft). You can see it working in TS as well if you want, here. It is closer to composition, but the comment mainly highlights that polymorphism is not something that you can only achieve with classes.