Skip to content

Instantly share code, notes, and snippets.

@popenkomaksim
Created August 5, 2015 09:39
Show Gist options
  • Save popenkomaksim/2beae5ed610ec90df99a to your computer and use it in GitHub Desktop.
Save popenkomaksim/2beae5ed610ec90df99a to your computer and use it in GitHub Desktop.
console.wish = function (wishes){
console.log("**** " + wishes + " ****");
};
function HappyBirthday() {
this.congratulate = function(name) {
console.wish("Happy Birthday " + name);
console.wish("Whish you no uncaught TypeErrors like: Cannot set property 'getMoney' of undefined");
console.wish("And no uncaught ReferenceError like: 'health' is not defined");
console.wish(":-)");
}
}
var bitrhdayInvitation = new HappyBirthday();
bitrhdayInvitation.congratulate("Zhanna");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment