Created
November 19, 2015 15:15
-
-
Save Vannevelj/fc5a632cb2ec7310abc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book { | |
constructor(title, author) { | |
this.title = title; | |
this.author = author; | |
} | |
display() { | |
const displayString = `${this.title} by ${this.author}`; | |
console.log(displayString); | |
} | |
static createGiveaway(title) { | |
console.log(`here's your free copy of "${title}"!`); | |
} | |
/** | |
* Thanks the given publisher | |
* @param {String} publisher | |
*/ | |
thankPublisher(publisher) { | |
console.log(`Thank you so much ${publisher}! I love you!`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment