Skip to content

Instantly share code, notes, and snippets.

@erichummel
Created May 4, 2012 15:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save erichummel/2595398 to your computer and use it in GitHub Desktop.
Save erichummel/2595398 to your computer and use it in GitHub Desktop.
brain teaser
(function(){
this.bar = "bobble";
window.bar = "gobble";
Foo = function(){
this.bar = "wobble";
}
Foo.prototype = {
weeble: function(){
console.log( this.bar );
},
foo: function(){
setTimeout( this.weeble );
}
};
foo = new Foo();
foo.foo();
})();
console.log( bar );
@patrickskim
Copy link

setTimeout is a bitch.

@ericgay
Copy link

ericgay commented Feb 14, 2017

🎤 Fuck this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment