Skip to content

Instantly share code, notes, and snippets.

@kamilogorek
Created November 27, 2013 01:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kamilogorek/7669062 to your computer and use it in GitHub Desktop.
Save kamilogorek/7669062 to your computer and use it in GitHub Desktop.
(function makeThanksgivingHappen (wishes) {
function Thanks () {
this.given = false;
}
Thanks.prototype.give = function () {
this.given = true;
}
var thanks = new Thanks();
do {
try {
thanks.give();
} catch (e) {
throw new Error(e.message);
}
} while (!thanks.given);
return wishes;
})('You just gave an awesome thanks!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment