Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Media {
- constructor(title, isCheckedOut = false, ratings = []) {
- this._title = title;
- this._isCheckedOut = isCheckedOut;
- this._ratings = ratings;
- }
- class Book extends Media {
- constructor(author, title, pages) {
- super(title);
- super(isCheckedOut);
- super(ratings);
- this._author = author;
- this._pages = pages;
- }
- const historyOfEverything = new Book ('Bill Bryson', 'A Short History of Nearly Everything', 544);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement