Polymorphism Exercise - JS OOP

Hi Mosh

I was watching the video of the polymorphism exercise, but I think the solution video is not showing polymorphism since each of the objects has its own render method as its own member

the solution video is more talk about the templating with es6

I confused where the polymorphism is since in the video that explain about polymorphism, you show how to modify the method from Parent to make the behavior a little bit different for each child

while in the exercise solution video, the parent object doesn’t have a render method while the child has their own render method, so where is the polymorphism?

1 Like

Hi am Harvel, it seems you got the concept of what polymorphism is, so don’t hang up on the details that might confuse you. If a parent method is being re implemented in the children with different behaviour that’s polymorphism :blush:

Hi Harvel,

Thank you for your response, agree with you…

but the problem is in this video the parent doesn’t have the method (render) while the child is implementing it on their own

Yeah I saw that too, so your claim is a correction to Mr mosh’s video

Yes, I think it will be good if Mr. Mosh can make some corrections to the video, so other members who learn that video can have a better understanding