Create a Book constructor that has two properties :
and two methods:
getTitle that returns: "Title: " + the instance title.getAuthor that returns: "Author: " + the instance author.and instantiate this constructor by creating 3 new books:
The name of the new object instances PP, H, and WP, respectively.
For instance, if I instantiated the following book using this Book constructor function:
I would get the following properties and methods:
HP.title ➞ "Harry Potter"
HP.author ➞ "J.K. Rowling"
HP.getTitle() ➞ "Title: Harry Potter"
HP.getAuthor() ➞ "Author: J.K. Rowling"