Last active
August 29, 2015 14:07
-
-
Save muZk/09e9f26f4aabdfd95690 to your computer and use it in GitHub Desktop.
Be Awesome
This file contains hidden or 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
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