Closed Vincent5182 closed 4 years ago
should bookDetails.publishedOn be bookDetails.pubDate?
class Book extends Publication { constructor(bookDetails) { super( bookDetails.title, bookDetails.author, bookDetails.publishedOn ); this.publisher = bookDetails.publisher; this.ISBN = bookDetails.ISBN; } print() { super.print(); console.log(` Published By: ${this.publisher} ISBN: ${this.ISBN} `); } } class BlogPost extends Publication { constructor(title,author,pubDate,URL) { super(title,author,pubDate); this.URL = URL; } print() { super.print(); console.log(this.URL); } }
looks like this was meant to be publishedOn
I think I was trying to show that the names don't have to be the same, since you're passing them manually as arguments.
should bookDetails.publishedOn be bookDetails.pubDate?