Exercise: Extending Objects
In this exercise, you will use object oriented programming concepts to extend
- Start with your solution from the last exercise (or copy it from here)
- Define a new class called
MusicVideo that extends
Video. Its constructor
should also take in an
- Instantiate a new
MusicVideo object and call the
watch() method on it.
- Add a method to MusicVideo called
rockOut() that uses
console.log to output a string like "You rocked out to La Bamba by Ritchie Valens!.
- Bonus: Use an array of data and a for loop to instantiate 5
- Bonus: Make an array of video data with both normal videos and music videos, loop through them, and decide on each one whether to make it a