Created
January 10, 2014 07:14
-
-
Save GirlBossRush/8348096 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
// core/initializers.js | |
var global = (function () { | |
return this || (0 || eval)('this'); | |
}()); | |
// example.js | |
(function () { | |
"use strict"; | |
// Good. | |
var foo = 1 + 1; | |
// Error. | |
bar = 1 + 1; | |
// Bad. Do not reference the window object. | |
window.Module = {}; | |
// Good. | |
global.Module = {}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment