Created
July 11, 2016 10:35
-
-
Save vasergen/572e81fa2ae902e3dc115eaef6b06973 to your computer and use it in GitHub Desktop.
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
(function() { | |
let chatModule = (function() { | |
let message = 'hi bro' | |
function say() { | |
console.log(message); | |
} | |
return { | |
say: say | |
} | |
})(); | |
if(!window.chatModule) { | |
window.chatModule = chatModule | |
} else { | |
console.error('bla bla bla') | |
} | |
})(window) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment