JavaScript Object-Oriented JavaScript Prototypal Inheritance Updating the Song Object

Roudy Antenor
Roudy Antenor
4,122 Points

Why not just add the play() and stop() methods within the media prototype build? Why make them prototypes of media??

Look to time 2:06 and you will see that instead of adding the play() and stop() methods to the media constructor prototype they were instead left out of the build, and made to be prototypes of the Media prototype ?? any reason why this was done??

when this was done at time 4:07:

Song.prototype = Object.create(Media.prototype);

was it done to add the play() and stop() methods to Song as prototypes of the Media constructor? Wasn't this done when we placed Media.call(this, title, duration) in our Song constructor? or was the title and duration properties the only thing added when we did that?