Skip to content

Instantly share code, notes, and snippets.

@muZk
Last active August 29, 2015 14:07
Show Gist options
  • Save muZk/09e9f26f4aabdfd95690 to your computer and use it in GitHub Desktop.
Save muZk/09e9f26f4aabdfd95690 to your computer and use it in GitHub Desktop.
Be Awesome
var sad = (function(){
var areYouSad = true;
Boolean.prototype.stop = function(){
areYouSad = false;
}
return function(){
return areYouSad;
}
})();
function beAwesome(){
if(document){
document.body.innerHTML = "<img src='http://www.lovethispic.com/uploaded_images/61100-Don-t-Forget-To-Be-Awesome.jpg' alt='Be Awesome :)'>";
} else {
console.log("Don't forget to be awesome");
}
}
if(sad() === true){
sad().stop();
beAwesome();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment