Last active
August 29, 2015 14:04
-
-
Save SecretDeveloper/572cb8995e5abb7e7779 to your computer and use it in GitHub Desktop.
Widget code isolation
This file contains 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 myVariable = "Some external value;" | |
(function(root){ | |
var myVariable = "Some internal value;" | |
console.log(myVariable); // will be "Some internal value" | |
})(window); | |
console.log(myVariable); // will still be "Some external value" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment