Skip to content

Instantly share code, notes, and snippets.

@seanmonstar
Created February 8, 2012 02:30
Show Gist options
  • Save seanmonstar/1764684 to your computer and use it in GitHub Desktop.
Save seanmonstar/1764684 to your computer and use it in GitHub Desktop.
function module(window) {
console.log('normal window', window);
console.log('a closure', (function() { return this; })());
console.log('new Func', (new Function('', 'return window'))());
}
module(); //this makes window undefined...sorta...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment