-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday13.js
More file actions
27 lines (25 loc) · 678 Bytes
/
Copy pathday13.js
File metadata and controls
27 lines (25 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Declare your class here.
class MyBook extends Book {
/**
* Class Constructor
*
// * @param title The book's title.
// * @param author The book's author.
// * @param price The book's price.
**/
// Write your constructor here
constructor(title,author,price){
super(title,author);
this.price=price
}
/**
* Method Name: display
*
* Print the title, author, and price in the specified format.
**/
// Write your method here
display() {
console.log('Title: ' + this.title + '\n' + 'Author: ' + this.author + '\n' + 'Price: ' + this.price);
}
// End class
}